MCU specific sleep feature is now defined in MCU specific file.

This commit is contained in:
NIIBE Yutaka
2017-11-17 11:43:05 +09:00
parent 66b4eb3058
commit 44054415c8
9 changed files with 156 additions and 120 deletions

9
mcu/stm32.h Normal file
View File

@@ -0,0 +1,9 @@
struct PWR
{
volatile uint32_t CR;
volatile uint32_t CSR;
};
static struct PWR *const PWR = ((struct PWR *)0x40007000);
#define PWR_CR_LPDS 0x0001 /* Low-power deepsleep */
#define PWR_CR_PDDS 0x0002 /* Power down deepsleep */
#define PWR_CR_CWUF 0x0004 /* Clear wakeup flag */