Merge pull request #6512 from dhalbert/7.3.x-6486-backport-nrf-wakeup
7.3.x #6486 backport nrf wakeup
This commit is contained in:
commit
d8badb5b81
@ -102,4 +102,5 @@ void reset_board(void) {
|
||||
}
|
||||
|
||||
void board_deinit(void) {
|
||||
common_hal_displayio_release_displays();
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ static const char *cause_str[] = {
|
||||
"VBUS",
|
||||
"RESETPIN",
|
||||
};
|
||||
void print_wakeup_cause(nrf_sleep_source_t cause) {
|
||||
static void print_wakeup_cause(nrf_sleep_source_t cause) {
|
||||
if (cause >= 0 && cause < NRF_SLEEP_WAKEUP_ZZZ) {
|
||||
mp_printf(&mp_plat_print, "wakeup cause = NRF_SLEEP_WAKEUP_%s\r\n",
|
||||
cause_str[(int)cause]);
|
||||
@ -108,7 +108,7 @@ bool common_hal_alarm_woken_from_sleep(void) {
|
||||
nrf_sleep_source_t cause = _get_wakeup_cause();
|
||||
#ifdef NRF_DEBUG_PRINT
|
||||
if (cause != NRF_SLEEP_WAKEUP_UNDEFINED) {
|
||||
// print_wakeup_cause(cause);
|
||||
print_wakeup_cause(cause);
|
||||
}
|
||||
#endif
|
||||
return cause == NRF_SLEEP_WAKEUP_GPIO || cause == NRF_SLEEP_WAKEUP_TIMER
|
||||
|
Loading…
x
Reference in New Issue
Block a user