
MC1322x SMAC Primitives
MC1322x SMAC Reference Manual, Rev. 1.7
3-8
Freescale Semiconductor
Arguments
u8HibClock
Selects the clock to be used while hibernating. The possible values for this
argument are: gXtal32khz_c and gRingOsc2khz_c.
SleepCtl
A structure of type crmSleepCtrl_t.
typedef struct
{
uint8_t sleepType:1;
uint8_t ramRet:2;
uint8_t mcuRet:1;
uint8_t digPadRet:1;
pfCallback_t pfToDoBeforeSleep;
}crmSleepCtrl_t;
Returns
gFailNoValidCondition_c
When there is no wakeup source configured.
gFailOutOfRange_c
When the u8HibClock argument is not a valid value.
gSuccess_c
In any other case.
Usage
•
Configures a wakeup source using MLMESetWakeupSource
•
Must have an assigned interrupt handler if needed (CrmAssignHandler can be used)
•
Calls MLMEHibernateRequest
3.2.10
MLMELinkQuality
This function reads the Link Quality Indication of the last received message.
Link Quality Indication (LQI) is an integer value from 0x00-0xFF.
0x00
Equates to -100 dBm
0xFF
Equates to -15 dBm.
The LQI formula in dBm is as follows:
LQi(dbm) = (LQI(dec)/3)-100
Eqn. 3-1
Prototype
FuncReturn_t MLMELinkQuality (uint8_t * u8ReturnValue);
Arguments
u8ReturnValue
A pointer to a 8 bit value where the LQI value will be stored.
Returns
gSuccess_c
This function always return gSuccess_c.