Primitives
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
Freescale Semiconductor
3-23
3.3
MLMEConfigureTxContext
This function aids the user in enabling/disabling the “LBT” and “AA” mechanisms and also to configure
the number of retries in case channel is found busy or no acknowledgement message is received.
Prototype
smacErrors_t MLMEConfigureTxContext(txContextConfig_t* pTxConfig);
Arguments
txContextConfig_t* pTxConfig: pointer to a configuration structure containing the information described
above.
Returns
gErrorNoError_c: The desired configuration is applied succesfully.
gErrorNoValidCondition_c: The number of retries is set but the corresponding mechanism boolean is set
to FALSE.
gErrorOutOfRange_c: The number of retries exceeds gMaxRetriesAllowed_c.
Usage
•
Declare a structure of txContextConfig_t type.
•
Set the desired values to the members.
•
Call
MLMEConfigureTxContext
with the address of the declared structure as parameter.
•
Capture the return value in a smacErrors_t variable and handle the result.
txContextConfig_t txConfigContext;
txConfigContext.autoAck = TRUE; //”AA” is enabled
txConfigContext.ccaBeforeTx = FALSE; //”LBT” is disabled
txConfigContext.retryCountAckFail = 0;// no retries in case no ACK is received
txConfigContext.retryCountCCAFail = 0;// no retries in case of channel busy
smacErrors_t err = MLMEConfigureTxContext(&txConfigContext);
...
Implementation
This primitive configures the way SMAC will handle data requests and responses from PHY according to
the parameters described by the txContextConfig_t structure. Also, requests forwarded by SMAC to PHY
depend on addressing and txContextConfig_t information.