<< Previous | Next >> | |
|
int set_cpu_power_mode( int mode, char clkDoubler, char shortChipSelect );
Description
- Sets operating power of the controller. Suspend serial communication and other data transmission activity prior to calling this function, which sets higher priority interrupt while switching clock frequencies.
- This function is non-reentrant.
Parameters
- mode
- Mode operation. Use the following table values below. (The higher the value the lower the power consumption of controller.)
- clkDoubler
- Clock doubler setting:
CLKDOUBLER_ON
orCLKDOUBLER_OFF
.
- CPU will operate at half selected speed when turned off. This parameter only affects main oscillator modes, not 32 kHZ oscillator modes. Turning Clock doubler off reduces power consumption.
- shortChipSelect
- Short Chip Select setting. Use
SHORTCS_OFF
, orSHORTCS_ON
.
Return Value
- 0: valid parameter
-1: invalid parameterLibrary
- low_power.lib
Dynamic C Functions | << Previous | Next >> | rabbit.com |