34#ifndef LPC17XX_POWER_H
35#define LPC17XX_POWER_H
42#define PWR_PCON MMIO32(SYSCON_BASE + 0x0c0)
43#define PWR_PCONP MMIO32(SYSCON_BASE + 0x0c4)
46#define PWR_PCON_MODE_SLEEP 0x00
47#define PWR_PCON_MODE_POWER_DOWN 0x01
49#define PWR_PCON_MODE_DEEPSLEEP 0x03
50#define PWR_PCON_BODRPM (1 << 2)
51#define PWR_PCON_BOGD (1 << 3)
52#define PWR_PCON_BORD (1 << 4)
54#define PWR_PCON_SMFLAG (1 << 8)
55#define PWR_PCON_DSFLAG (1 << 9)
56#define PWR_PCON_PDFLAG (1 << 10)
57#define PWR_PCON_DPDFLAG (1 << 11)
62#define PWR_PCONP_TIMER0 (1 << 1)
63#define PWR_PCONP_TIMER1 (1 << 2)
64#define PWR_PCONP_UART0 (1 << 3)
65#define PWR_PCONP_UART1 (1 << 4)
67#define PWR_PCONP_PWM1 (1 << 6)
68#define PWR_PCONP_I2C0 (1 << 7)
69#define PWR_PCONP_SPI (1 << 8)
70#define PWR_PCONP_RTC (1 << 9)
71#define PWR_PCONP_SSP1 (1 << 10)
73#define PWR_PCONP_ADC (1 << 12)
74#define PWR_PCONP_CAN1 (1 << 13)
75#define PWR_PCONP_CAN2 (1 << 14)
76#define PWR_PCONP_GPIO (1 << 15)
77#define PWR_PCONP_RIT (1 << 16)
78#define PWR_PCONP_MCPWM (1 << 17)
79#define PWR_PCONP_QEI (1 << 18)
80#define PWR_PCONP_I2C1 (1 << 19)
82#define PWR_PCONP_SSP0 (1 << 21)
83#define PWR_PCONP_TIMER2 (1 << 22)
84#define PWR_PCONP_TIMER3 (1 << 23)
85#define PWR_PCONP_UART2 (1 << 24)
86#define PWR_PCONP_UART3 (1 << 25)
87#define PWR_PCONP_I2C2 (1 << 26)
88#define PWR_PCONP_I2S (1 << 27)
90#define PWR_PCONP_GPDMA (1 << 29)
91#define PWR_PCONP_ETHERNET (1 << 30)
92#define PWR_PCONP_USB (1 << 31)
void pwr_enable_peripherals(uint32_t peripherals)
void pwr_disable_peripherals(uint32_t peripherals)