MiMAC_PowerState Function

MiWi Development Environment

MiWi(TM) Development Environment Help
MiMAC_PowerState Function
C
BOOL MiMAC_PowerState(
    BYTE PowerState
);
Description

This is the primary MiMAC interface for the protocol layer to set different power state for the RF transceiver. There are minimal power states defined as deep sleep and operating mode. Additional power states can be defined for individual RF transceiver depends on hardware design.

Preconditions

MiMAC initialization has been done.

Parameters
Parameters 
Description 
BYTE PowerState 
The power state of the RF transceiver to be set to. The minimum definitions for all RF transceivers are

 

Returns

A boolean to indicate if chaning power state of RF transceiver is successful.

Remarks

None

Example
// Put RF transceiver into sleep
MiMAC_PowerState(POWER_STATE_DEEP_SLEEP);
// Put MCU to sleep
Sleep();
// Wake up the MCU by WDT, external interrupt or any other means

// Wake up the RF transceiver
MiMAC_PowerState(POWER_STATE_OPERATE); 
Microchip My Application xx.yy - [Jan 1, 2009]
Copyright © 2009 Microchip Technology, Inc.  All rights reserved.