@@ -33,28 +33,28 @@ void common_hal_mcu_processor_get_uid(uint8_t raw_id[]) {
3333}
3434
3535mcu_reset_reason_t common_hal_mcu_processor_get_reset_reason (void ) {
36- mcu_reset_reason_t r = RESET_REASON_UNKNOWN ;
37- if (reset_reason_saved == 0 ) {
38- r = RESET_REASON_POWER_ON ;
39- } else if (reset_reason_saved & POWER_RESETREAS_RESETPIN_Msk ) {
40- r = RESET_REASON_RESET_PIN ;
41- } else if (reset_reason_saved & POWER_RESETREAS_DOG_Msk ) {
42- r = RESET_REASON_WATCHDOG ;
43- } else if (reset_reason_saved & POWER_RESETREAS_SREQ_Msk ) {
44- r = RESET_REASON_SOFTWARE ;
45- #if CIRCUITPY_ALARM
46- // Our "deep sleep" is still actually light sleep followed by a software
47- // reset. Adding this check here ensures we treat it as-if we're waking
48- // from deep sleep.
49- if (sleepmem_wakeup_event != SLEEPMEM_WAKEUP_BY_NONE ) {
50- r = RESET_REASON_DEEP_SLEEP_ALARM ;
51- }
52- #endif
53- } else if ((reset_reason_saved & POWER_RESETREAS_OFF_Msk ) ||
54- (reset_reason_saved & POWER_RESETREAS_LPCOMP_Msk ) ||
55- (reset_reason_saved & POWER_RESETREAS_NFC_Msk ) ||
56- (reset_reason_saved & POWER_RESETREAS_VBUS_Msk )) {
57- r = RESET_REASON_DEEP_SLEEP_ALARM ;
58- }
59- return r ;
36+ // mcu_reset_reason_t r = RESET_REASON_UNKNOWN;
37+ // if (reset_reason_saved == 0) {
38+ // r = RESET_REASON_POWER_ON;
39+ // } else if (reset_reason_saved & POWER_RESETREAS_RESETPIN_Msk) {
40+ // r = RESET_REASON_RESET_PIN;
41+ // } else if (reset_reason_saved & POWER_RESETREAS_DOG_Msk) {
42+ // r = RESET_REASON_WATCHDOG;
43+ // } else if (reset_reason_saved & POWER_RESETREAS_SREQ_Msk) {
44+ // r = RESET_REASON_SOFTWARE;
45+ // #if CIRCUITPY_ALARM
46+ // // Our "deep sleep" is still actually light sleep followed by a software
47+ // // reset. Adding this check here ensures we treat it as-if we're waking
48+ // // from deep sleep.
49+ // if (sleepmem_wakeup_event != SLEEPMEM_WAKEUP_BY_NONE) {
50+ // r = RESET_REASON_DEEP_SLEEP_ALARM;
51+ // }
52+ // #endif
53+ // } else if ((reset_reason_saved & POWER_RESETREAS_OFF_Msk) ||
54+ // (reset_reason_saved & POWER_RESETREAS_LPCOMP_Msk) ||
55+ // (reset_reason_saved & POWER_RESETREAS_NFC_Msk) ||
56+ // (reset_reason_saved & POWER_RESETREAS_VBUS_Msk)) {
57+ // r = RESET_REASON_DEEP_SLEEP_ALARM;
58+ // }
59+ // return r;
6060}
0 commit comments