Fix linker error when ONEWIREIO = 0

This addendum to #5139 allows actually turning off onewireio. (Not
currently used by any board.)
This commit is contained in:
Christian Walther 2021-08-20 18:06:40 +02:00
parent a98363348a
commit d79a9e0e69
2 changed files with 4 additions and 0 deletions

View File

@ -72,7 +72,9 @@
STATIC const mp_rom_map_elem_t bitbangio_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_bitbangio) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&bitbangio_i2c_type) },
#if CIRCUITPY_ONEWIREIO
{ MP_ROM_QSTR(MP_QSTR_OneWire), MP_ROM_PTR(&onewireio_onewire_type) },
#endif
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&bitbangio_spi_type) },
};

View File

@ -73,7 +73,9 @@ 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_I2C), MP_ROM_PTR(&busio_i2c_type) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&busio_spi_type) },
#if CIRCUITPY_ONEWIREIO
{ MP_ROM_QSTR(MP_QSTR_OneWire), MP_ROM_PTR(&onewireio_onewire_type) },
#endif
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&busio_uart_type) },
};