File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -127,11 +127,12 @@ void microbit_hal_power_off(void) {
127127 uBit.power .off ();
128128}
129129
130- void microbit_hal_power_deep_sleep (bool wake_on_ms, uint32_t ms) {
130+ bool microbit_hal_power_deep_sleep (bool wake_on_ms, uint32_t ms) {
131131 if (wake_on_ms) {
132- uBit.power .deepSleep (ms, true );
132+ return uBit.power .deepSleep (ms, true );
133133 } else {
134134 uBit.power .deepSleep ();
135+ return true ; // Sleep was interrupted by a wake event.
135136 }
136137}
137138
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ void microbit_hal_power_clear_wake_sources(void);
112112void microbit_hal_power_wake_on_button (int button , bool wake_on_active );
113113void microbit_hal_power_wake_on_pin (int pin , bool wake_on_active );
114114void microbit_hal_power_off (void );
115- void microbit_hal_power_deep_sleep (bool wake_on_ms , uint32_t ms );
115+ bool microbit_hal_power_deep_sleep (bool wake_on_ms , uint32_t ms );
116116
117117void microbit_hal_pin_set_pull (int pin , int pull );
118118int microbit_hal_pin_get_pull (int pin );
You can’t perform that action at this time.
0 commit comments