restore I2C and UART. Don't do port.c resets and inits for modules that are not available.
This commit is contained in:
parent
b9f36184f5
commit
ee896cdd41
|
@ -190,7 +190,10 @@ safe_mode_t port_init(void) {
|
|||
|
||||
// Configure millisecond timer initialization.
|
||||
tick_init();
|
||||
|
||||
#ifndef PIRKEY_M0
|
||||
rtc_init();
|
||||
#endif
|
||||
|
||||
// Init the nvm controller.
|
||||
// struct nvm_config config_nvm;
|
||||
|
@ -249,18 +252,19 @@ void reset_port(void) {
|
|||
pulsein_reset();
|
||||
pulseout_reset();
|
||||
pwmout_reset();
|
||||
|
||||
#ifndef PIRKEY_M0
|
||||
analogin_reset();
|
||||
analogout_reset();
|
||||
rtc_reset();
|
||||
#endif
|
||||
|
||||
reset_gclks();
|
||||
|
||||
analogin_reset();
|
||||
|
||||
#ifdef CIRCUITPY_GAMEPAD_TICKS
|
||||
gamepad_reset();
|
||||
#endif
|
||||
|
||||
analogout_reset();
|
||||
|
||||
reset_event_system();
|
||||
|
||||
reset_all_pins();
|
||||
|
|
|
@ -87,13 +87,10 @@
|
|||
|
||||
STATIC const mp_rom_map_elem_t busio_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_busio) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&busio_spi_type) },
|
||||
// a pIRKey does not need these. Remove them to make room for frozen modules.
|
||||
#ifndef PIRKEY_M0
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&busio_i2c_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&busio_spi_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_OneWire), MP_ROM_PTR(&busio_onewire_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&busio_uart_type) },
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC MP_DEFINE_CONST_DICT(busio_module_globals, busio_module_globals_table);
|
||||
|
|
Loading…
Reference in New Issue