STC15W408AS library 0.13.0
Loading...
Searching...
No Matches
Macros
power_management.h File Reference
#include <sys.h>
#include <bits.h>
#include <stdint.h>
#include <stdbool.h>
Include dependency graph for power_management.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WIRC_H_ADDRESS   0xf8
 Wakeup timer internal clock frequency value high byte address.
 
#define WIRC_L_ADDRESS   0xf9
 Wakeup timer internal clock frequency value low byte address.
 
#define idle()   (bit_set(PCON, SBIT0))
 Set MCU idle mode.
 
#define power_down()
 Set MCU power down mode.
 
#define wakeup_timer_init(ticks)
 Init and run wakeup timer.
 
#define wakeup_timer_internal_clk_freq()   (((uint16_t)*wirc_h_ptr << 8) | *wirc_l_ptr)
 Get wakeup timer internal clock frequency.
 
#define power_low_voltage_flag_get()   (get_bit(PCON, 5))
 Retrieves the status of the low voltage detection flag.
 
#define power_low_voltage_flag_clear()   (bit_clr(PCON, CBIT5))
 Clears the low voltage detection flag in the PCON register.