Daiki Kato
/
Sleep_test_use_OS
This is a sample to make sleep using OS.
Diff: main.cpp
- Revision:
- 2:22bc64c6ee90
- Parent:
- 1:8ba32924482c
--- a/main.cpp Fri Nov 18 09:42:04 2016 +0000 +++ b/main.cpp Fri Nov 18 10:39:33 2016 +0000 @@ -4,12 +4,9 @@ InterruptIn button(USER_BUTTON0); DigitalOut led1(LED1); Thread * pTestTask = NULL; -static int debug_cnt = 0; // for debug static void idle_hook(void) { - __SEV(); - __WFE(); - __WFE(); + __WFI(); // Do not set when using SoftwareStandby. } static void interrupt_button(void) {