Fix declaration of print_wakeup_cause

This commit is contained in:
root 2022-06-14 20:51:07 -05:00 committed by Dan Halbert
parent 803c18c71f
commit 1ad3daf75b

View File

@ -48,9 +48,6 @@
#include "nrf_power.h" #include "nrf_power.h"
#include "nrfx.h" #include "nrfx.h"
#include "nrfx_gpiote.h" #include "nrfx_gpiote.h"
#ifdef NRF_DEBUG_PRINT
static void print_wakeup_cause(nrf_sleep_source_t cause);
#endif
// Singleton instance of SleepMemory. // Singleton instance of SleepMemory.
const alarm_sleep_memory_obj_t alarm_sleep_memory_obj = { const alarm_sleep_memory_obj_t alarm_sleep_memory_obj = {
@ -99,7 +96,7 @@ static const char *cause_str[] = {
"VBUS", "VBUS",
"RESETPIN", "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) { if (cause >= 0 && cause < NRF_SLEEP_WAKEUP_ZZZ) {
mp_printf(&mp_plat_print, "wakeup cause = NRF_SLEEP_WAKEUP_%s\r\n", mp_printf(&mp_plat_print, "wakeup cause = NRF_SLEEP_WAKEUP_%s\r\n",
cause_str[(int)cause]); cause_str[(int)cause]);