Nuvoton
/
NuMaker-mbed-tickless-example
NuMaker tickless example
wakeup.h
- Committer:
- ccli8
- Date:
- 2017-09-12
- Revision:
- 1:eb1da9d36e12
- Child:
- 2:dbe00b3a7545
File content as of revision 1:eb1da9d36e12:
#ifndef __WAKEUP_H__ #define __WAKEUP_H__ #include <vector> #include "mbed.h" /* EventFlags is supported from mbed-os-5.5.6. Before then, we need EventFlags_. */ #if (MBED_MAJOR_VERSION <= 5 && MBED_MINOR_VERSION <= 5 && MBED_PATCH_VERSION <= 6) #include "EventFlags_.h" #endif enum EventFlag_Wakeup { EventFlag_Wakeup_Button1 = (1 << 0), EventFlag_Wakeup_Button2 = (1 << 1), EventFlag_Wakeup_LPTicker = (1 << 2), EventFlag_Wakeup_WDT_Timeout = (1 << 3), EventFlag_Wakeup_RTC_Alarm = (1 << 4), EventFlag_Wakeup_UART_CTS = (1 << 5), EventFlag_Wakeup_I2C_AddrMatch = (1 << 6), EventFlag_Wakeup_UnID = (1 << 7), EventFlag_Wakeup_All = 0xFF, }; #if (MBED_MAJOR_VERSION <= 5 && MBED_MINOR_VERSION <= 5 && MBED_PATCH_VERSION <= 6) extern EventFlags_ wakeup_eventflags; #else extern EventFlags wakeup_eventflags; #endif void config_pwrctl(void); void config_button_wakeup(void); void config_wdt_wakeup(void); void config_rtc_wakeup(void); void config_uart_wakeup(void); void config_i2c_wakeup(void); #endif // target-power.h