fix sleepmemory object redefine error

This commit is contained in:
Lucian Copeland 2021-04-29 17:28:06 -04:00
parent bab5a22f0c
commit 07b86fcb76
2 changed files with 9 additions and 1 deletions

View File

@ -31,6 +31,7 @@
#include "lib/utils/interrupt_char.h"
#include "shared-bindings/alarm/__init__.h"
#include "shared-bindings/alarm/SleepMemory.h"
#include "shared-bindings/alarm/pin/PinAlarm.h"
#include "shared-bindings/alarm/time/TimeAlarm.h"
@ -39,6 +40,13 @@
#include "supervisor/port.h"
#include "supervisor/shared/workflow.h"
// Singleton instance of SleepMemory.
const alarm_sleep_memory_obj_t alarm_sleep_memory_obj = {
.base = {
.type = &alarm_sleep_memory_type,
},
};
STATIC uint8_t true_deep_wake_reason;
STATIC mp_obj_t most_recent_alarm;

View File

@ -29,7 +29,7 @@
#include "common-hal/alarm/SleepMemory.h"
const alarm_sleep_memory_obj_t alarm_sleep_memory_obj;
extern const alarm_sleep_memory_obj_t alarm_sleep_memory_obj;
#define STM_WAKEUP_UNDEF 0
#define STM_WAKEUP_GPIO 1