|
29 | 29 | #include "py/runtime.h"
|
30 | 30 | #include "common-hal/alarm/SleepMemory.h"
|
31 | 31 |
|
32 |
| -// Data storage for singleton instance of SleepMemory. |
33 |
| -// Might be RTC_SLOW_MEM or RTC_FAST_MEM, depending on setting of CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM. |
34 |
| -// static RTC_DATA_ATTR uint8_t _sleep_mem[SLEEP_MEMORY_LENGTH]; |
35 |
| - |
36 | 32 | void alarm_sleep_memory_reset(void) {
|
37 |
| - // ESP-IDF build system takes care of doing esp_sleep_pd_config() or the equivalentwith |
38 |
| - // the correct settings, depending on which RTC mem we are using. |
39 |
| - // https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/system/sleep_modes.html#power-down-of-rtc-peripherals-and-memories |
40 | 33 | }
|
41 | 34 |
|
42 | 35 | uint32_t common_hal_alarm_sleep_memory_get_length(alarm_sleep_memory_obj_t *self) {
|
43 |
| - return 0;// sizeof(_sleep_mem); |
| 36 | + mp_raise_NotImplementedError(translate("Sleep Memory not available")); |
| 37 | + return 0; |
44 | 38 | }
|
45 | 39 |
|
46 | 40 | bool common_hal_alarm_sleep_memory_set_bytes(alarm_sleep_memory_obj_t *self, uint32_t start_index, const uint8_t *values, uint32_t len) {
|
47 |
| - |
48 |
| - // if (start_index + len > sizeof(_sleep_mem)) { |
49 |
| - // return false; |
50 |
| - // } |
51 |
| - |
52 |
| - // memcpy((uint8_t *)(_sleep_mem + start_index), values, len); |
53 |
| - // return true; |
| 41 | + mp_raise_NotImplementedError(translate("Sleep Memory not available")); |
54 | 42 | return false;
|
55 | 43 | }
|
56 | 44 |
|
57 | 45 | void common_hal_alarm_sleep_memory_get_bytes(alarm_sleep_memory_obj_t *self, uint32_t start_index, uint8_t *values, uint32_t len) {
|
58 |
| - |
59 |
| - // if (start_index + len > sizeof(_sleep_mem)) { |
60 |
| - // return; |
61 |
| - // } |
62 |
| - // memcpy(values, (uint8_t *)(_sleep_mem + start_index), len); |
| 46 | + mp_raise_NotImplementedError(translate("Sleep Memory not available")); |
63 | 47 | }
|
0 commit comments