diff --git a/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c b/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c index cfd4a9f893..da99863e4c 100644 --- a/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c +++ b/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c @@ -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 diff --git a/shared-bindings/keypad/__init__.c b/shared-bindings/keypad/__init__.c index e12992ec5f..4450e892ca 100644 --- a/shared-bindings/keypad/__init__.c +++ b/shared-bindings/keypad/__init__.c @@ -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 },