Mlmerxenablerequest - NXP Semiconductors MKW01 Reference Manual

Simple media access controller (smac)
Table of Contents

Advertisement

Primitives
3.4

MLMERXEnableRequest

Places the radio into receive mode on the channel pre-selected by MLMESetChannelRequest ().
Prototype
smacErrors_t MLMERXEnableRequest(rxPacket_t *gsRxPacket, uint32_t u32Timeout);
Arguments
rxPacket_t *gsRxPacket: Pointer to the structure where the reception results will be stored.
uint32_t u32Timeout: 32-bit timeout value in symbol duration. One symbol duration is equivalent to a 16
us duration.
Returns
gErrorNoError_c
gErrorOutOfRange_c
gErrorBusy_c
gErrorNoValidCondition_c
gErrorNoResourcesAvailable_c
Usage
SMAC must be initialized before calling this function.
Declare a variable of the type smacErrors_t to save the result of the function execution.
Prepare the rxPacket_t parameter as explained in
usage.
Call MLMERXEnableRequest function.
If the result of the call of the function is different to gErrorNoError_c, the application may handle
the error returned. For instance, if the result is gErrorBusy_c the application should wait for the
radio to finish a previous operation.
uint8_t RxDataBuffer[gMaxSmacSDULength_c + sizeof(rxPacket_t)];
rxPacket_t *RxPacket;
smacErrors_t smacError;
RxPacket = (rxPacket_t*)RxDataBuffer;
RxPacket->u8MaxDataLength =
smacError = MLMERXEnableRequest(RxPacket, 0);
...
The return of anything different than gErrorNoError_c implies that the
receiver did not go into receive mode.
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
3-24
Everything is ok and the reception will be performed
One of the members in the rxPacket_t structure is out of range (not
valid buffer size or data buffer pointer is NULL).
The radio is performing another action and could not attend this
request.
The MKW01 SMAC has not been initialized.
The PHY cannot process a MKW01 SMAC request, so the
MKW01 SMAC cannot process it.
Section 2.2.2,
gMaxSmacSDULength_c;
NOTE
"rxPacket_t" declaration and
Freescale Semiconductor

Advertisement

Table of Contents
loading

Table of Contents