diff options
| author | Peter D. Gray | 2018-01-04 11:45:36 -0500 |
|---|---|---|
| committer | Damien George | 2018-01-31 15:59:04 +1100 |
| commit | 1ed2c23efb3dc4d12f07e10e20f6194da4babf16 (patch) | |
| tree | d38b5d7c0715cc5743ffeb6ae55873e4a868d4bd | |
| parent | a275cb0f487cd6517760271dc01d369c32600c63 (diff) | |
stm32/modmachine: Handle case of no MICROPY_PY_MACHINE_I2C.
| -rw-r--r-- | ports/stm32/modmachine.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/stm32/modmachine.c b/ports/stm32/modmachine.c index 8c59758fa..d9eb6383e 100644 --- a/ports/stm32/modmachine.c +++ b/ports/stm32/modmachine.c @@ -558,7 +558,9 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_RTC), MP_ROM_PTR(&pyb_rtc_type) }, { MP_ROM_QSTR(MP_QSTR_ADC), MP_ROM_PTR(&pyb_adc_type) }, #endif +#if MICROPY_PY_MACHINE_I2C { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&machine_i2c_type) }, +#endif { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&machine_hard_spi_type) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&pyb_uart_type) }, { MP_ROM_QSTR(MP_QSTR_WDT), MP_ROM_PTR(&pyb_wdt_type) }, |
