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/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c b/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c index 0bc0bc214e..4e06b77b56 100644 --- a/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +++ b/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c @@ -185,13 +185,13 @@ static void frequencyin_reference_tc_init(void) { #ifdef SAMD21 tc->COUNT16.CTRLA.reg = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_PRESCALER_DIV1; - tc->COUNT16.INTENSET.bit.OVF = 1; + tc->COUNT16.INTENSET.reg = TC_INTENSET_OVF; NVIC_EnableIRQ(TC3_IRQn + reference_tc); #endif #ifdef SAM_D5X_E5X tc->COUNT16.CTRLA.reg = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_PRESCALER_DIV1; - tc->COUNT16.INTENSET.bit.OVF = 1; + tc->COUNT16.INTENSET.reg = TC_INTENSET_OVF; NVIC_EnableIRQ(TC0_IRQn + reference_tc); #endif } diff --git a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c index 2091b7d302..65d238ce75 100644 --- a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c +++ b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c @@ -58,7 +58,7 @@ STATIC void setup_wdt(watchdog_watchdogtimer_obj_t *self, int setting) { while (WDT->SYNCBUSY.reg) { // Sync CTRL write } - WDT->INTENCLR.bit.EW = 1; // Disable early warning interrupt + WDT->INTENCLR.reg = WDT_INTENCLR_EW; // Disable early warning interrupt WDT->CONFIG.bit.PER = setting; // Set period for chip reset WDT->CTRLA.bit.WEN = 0; // Disable window mode while (WDT->SYNCBUSY.reg) { // Sync CTRL write 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 },