Skip to content

Commit 1825fc8

Browse files
authored
Merge pull request #5188 from cwalther/onewireio
Fix linker error when ONEWIREIO = 0
2 parents a983633 + d79a9e0 commit 1825fc8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

shared-bindings/bitbangio/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@
7272
STATIC const mp_rom_map_elem_t bitbangio_module_globals_table[] = {
7373
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_bitbangio) },
7474
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&bitbangio_i2c_type) },
75+
#if CIRCUITPY_ONEWIREIO
7576
{ MP_ROM_QSTR(MP_QSTR_OneWire), MP_ROM_PTR(&onewireio_onewire_type) },
77+
#endif
7678
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&bitbangio_spi_type) },
7779
};
7880

shared-bindings/busio/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ STATIC const mp_rom_map_elem_t busio_module_globals_table[] = {
7373
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_busio) },
7474
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&busio_i2c_type) },
7575
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&busio_spi_type) },
76+
#if CIRCUITPY_ONEWIREIO
7677
{ MP_ROM_QSTR(MP_QSTR_OneWire), MP_ROM_PTR(&onewireio_onewire_type) },
78+
#endif
7779
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&busio_uart_type) },
7880
};
7981

0 commit comments

Comments
 (0)