Clear TAMPER interrupt properly; make keypad module table const
This commit is contained in:
parent
f695b14e93
commit
c06eee9841
@ -164,7 +164,7 @@ void alarm_pin_pinalarm_reset(void) {
|
||||
woke_up = false;
|
||||
SAMD_ALARM_FLAG &= ~SAMD_ALARM_FLAG_PIN; // clear flag
|
||||
// Disable TAMPER interrupt
|
||||
RTC->MODE0.INTENCLR.bit.TAMPER = 1;
|
||||
RTC->MODE0.INTENCLR.reg = RTC_MODE0_INTENCLR_TAMPER;
|
||||
// Disable TAMPER control
|
||||
common_hal_mcu_disable_interrupts();
|
||||
RTC->MODE0.CTRLA.bit.ENABLE = 0; // Disable the RTC
|
||||
|
@ -42,7 +42,7 @@
|
||||
//| """
|
||||
//|
|
||||
|
||||
STATIC mp_map_elem_t keypad_module_globals_table[] = {
|
||||
STATIC mp_rom_map_elem_t keypad_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_keypad) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_Event), MP_OBJ_FROM_PTR(&keypad_event_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_EventQueue), MP_OBJ_FROM_PTR(&keypad_eventqueue_type) },
|
||||
@ -51,7 +51,7 @@ STATIC mp_map_elem_t keypad_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_ShiftRegisterKeys), MP_OBJ_FROM_PTR(&keypad_shiftregisterkeys_type) },
|
||||
};
|
||||
|
||||
STATIC MP_DEFINE_MUTABLE_DICT(keypad_module_globals, keypad_module_globals_table);
|
||||
STATIC MP_DEFINE_CONST_DICT(keypad_module_globals, keypad_module_globals_table);
|
||||
|
||||
const mp_obj_module_t keypad_module = {
|
||||
.base = { &mp_type_module },
|
||||
|
Loading…
Reference in New Issue
Block a user