Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 1.71 KB

File metadata and controls

12 lines (9 loc) · 1.71 KB

MiApp_TransceiverPowerState

|API|uint8_t MiApp_TransceiverPowerState(uint8_t Mode)| |Description|This is the primary user interface function for the application layer to set the RF transceiver into sleep or wake up. This function is only available to those wireless nodes that have to disable the transceiver to save battery power.| |Pre-Condition|Protocol initialization is done.| |Parameters|uint8_t Mode – mode of the power state for the RF transceiver to be set. The possible powerstates are following.• POWER_STATE_SLEEP – deep sleep mode for the RF transceiver• POWER_STATE_WAKEUP – Wake-Up state, or operating state for the RF transceiver• POWER_STATE_WAKEUP_DR – Set the device into the Wake-Up mode and transmit the data request to the device's associated device| |Returns|The status of the operation. The following are the possible status.• SUCCESS – operation is successful.• ERR_TRX_FAIL – Transceiver fails to go to the Sleep or Wake-Up mode.• ERR_TX_FAIL – transmission of Data Request command failed. Only available if the inputmode is POWER_STATE_WAKEUP_DR.• ERR_RX_FAIL – failed to receive any response to Data Request command. Only available ifthe input mode is POWER_STATE_WAKEUP_DR.• ERR_INVLAID_INPUT – invalid input mode.| |Example|<code>// put RF transceiver into sleepMiApp_TransceiverPowerState(POWER_STATE_SLEEP;// Put the MCU into sleepSleep();// wakes up the MCU by WDT, external interrupt or any other means// make sure that RF transceiver to wake up and send out Data RequestMiApp_TransceiverPowerState(POWER_STATE_WAKEUP_DR);</code>| |Remarks|None|

Parent topic:MiApp API Description