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:
Scott Shawcroft 2022-06-22 09:38:03 -07:00 committed by GitHub
commit d8badb5b81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -102,4 +102,5 @@ void reset_board(void) {
}
void board_deinit(void) {
common_hal_displayio_release_displays();
}

View File

@ -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