MiApp_TransceiverPowerState Function

MiWi Development Environment

MiWi(TM) Development Environment Help
MiApp_TransceiverPowerState Function
C
BYTE MiApp_TransceiverPowerState(
    BYTE Mode
);
Description

This is the primary user interface functions for the application layer to put RF transceiver into sleep or wake it up. This function is only available to those wireless nodes that may have to disable the transceiver to save battery power. 

This is the primary user interface functions for the application layer to put RF transceiver into sleep or wake it up. This function is only available to those wireless nodes that may have to disable the transceiver to save battery power.

Preconditions

Protocol initialization has been done. 

Protocol initialization has been done.

Parameters
Parameters 
Description 
BYTE Mode 
The mode of power state for the RF transceiver to be set. The possible power states are following

The mode of power state for the RF transceiver to be set. The possible power states are following

 

Returns

The status of the operation. The following are the possible status

 

The status of the operation. The following are the possible status

Remarks

None 

None

Example 1
// put RF transceiver into sleep
MiApp_TransceiverPowerState(POWER_STATE_SLEEP;

// Put the MCU into sleep
Sleep();    

// wakes up the MCU by WDT, external interrupt or any other means

// make sure that RF transceiver to wake up and send out Data Request
MiApp_TransceiverPowerState(POWER_STATE_WAKEUP_DR);
Example 2
// put RF transceiver into sleep
MiApp_TransceiverPowerState(POWER_STATE_SLEEP;

// Put the MCU into sleep
Sleep();    

// wakes up the MCU by WDT, external interrupt or any other means

// make sure that RF transceiver to wake up and send out Data Request
MiApp_TransceiverPowerState(POWER_STATE_WAKEUP_DR);
Microchip My Application xx.yy - [Jan 1, 2009]
Copyright © 2009 Microchip Technology, Inc.  All rights reserved.