Primitives
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
Freescale Semiconductor
3-29
gErrorBusy_c
The radio is performing another action.
gErrorNoValidCondition_c The
MKW01
SMAC has not been initialized.
Usage
Call the function with the selected channel to be scanned.
MLMEScanRequest(u8ChannelToScan);
NOTE
Be sure to enter a valid channel. Be sure to switch back to the previous
channel after receiving the result.
3.12
MLMECcaRequest
This function creates a CCA request message and sends it to the PHY. CCA is performed on the active
channel (set with MLMESetChannelRequest). The result will be received in a message passed through the
SMAC to application management SAP.
Arguments
None
Returns
gErrorNoValidCondition_c
The MKW01 SMAC has not been initialized.
gErrorBusy_c
Either SMAC or PHY is busy and can not process the request.
gErrorNoError_c
Everything is normal and the request was processed.
Usage
Call the function. The application can store the return value in a smacErrors_t variable and handle the error
in case it occurs. For example, if the return value is gErrorBusy_c, the application can wait on this value
until SMAC becomes idle.
smacErrors_t ReturnValue;
ReturnValue = MLMECcaRequest();
//Handle return value
...
Implementation
This function creates a message for PHY requesting a CCA on the currently selected channel. After
passing the message through the SAP, SMAC changes it’s state to
mSmacStatePerformingCca_c
.