
Primitives
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
3-26
Freescale Semiconductor
It aborts the current requested action, puts the PHY in the idle state, and sets the transceiver in standby
mode. It also disables any previous timeout programmed.
3.6
MLMELinkQuality
This function returns an integer value that is link quality value from the last received packet, offering
information on how good is the “link” between the transmitter and the receiver. The LQI value is between
0 and 255, where 0 means bad “link” and 255 is the exact opposite.
Prototype
uint8_t MLMELinkQuality(void);
Arguments
None.
Returns
uint8_t
8-bit value representing the link quality value. Returns the result in
smacLastDataRxParams.linkQuality.
Zero
The MKW01 SMAC has not been initialized.
Usage
Call the MLMELinkQuality()
Implementation
This function reads the stored value in smacLastDataRxParams.linkQuality. This element contains the LQI
value calculated by the transceiver and interpreted by the PHY layer during the last reception.
3.7
MLMESetChannelRequest
This sets the frequency on which the radio will transmit or receive.
Prototype
smacErrors_t MLMESetChannelRequest(channels_t newChannel);
Arguments
channels_t newChannel: An 8-bit value that represents the requested channel.
Returns
gErrorNoError_c
The channel set has been performed.
gErrorBusy_c
The MKW01 SMAC is busy in other radio activity like
transmitting/receiving data or performing a channel scan.
gErrorOutOfRange_c
The requested channel is not valid.