
MC1322x SMAC Primitives
MC1322x SMAC Reference Manual, Rev. 1.7
3-6
Freescale Semiconductor
•
Set the message type to energy detect by using [msg].u8Status.msg_type = ED;
•
Call MLMEEnergyDetect() passing the message and the channel to be asses as parameters.
Success response means that the message has been added to the message queue, to validate the
successful transition of the message check the [msg].u8Status.msg_state
•
Ensure that the process_radio_msg() is called since this function processes the pending messages
•
When the message is on a MSG_ED_ACTION_COMPLETE_SUCCESS state, read the energy
detect value at [msg].pu8Buffer->u8Data[0].
This function does not perform blocking which is different than previous SMAC versions.
NOTE
To perform energy detect on two or more channels use the
MLMEScanRequest function. See the
MLMEScanRequest
description for
more details.
3.2.6
MLMEGetChannelRequest
This function returns the current channel, if an error is detected it returns 255.
Prototype
uint8_t MLMEGetChannelRequest (void);
Arguments
None.
Returns
gChannel11_c to gChannel26_c The current RF channel.
0xFF
If current channel could not be detected
Usage
Call MLMEGetPromiscuousMode.
3.2.7
MLMEGetPromiscuousMode
This function returns the current state of promiscuous mode.
Prototype
bool_t MLMEGetPromiscuousMode(void);
Arguments
None.