From fec5c750681e4d78b9785bf7e49baf9c2d0cc52f Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Sun, 29 Jan 2017 16:41:18 +0100 Subject: [PATCH] nrf5: Adding i2c class to machine module globals table. --- nrf5/modmachine.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nrf5/modmachine.c b/nrf5/modmachine.c index fdff283803..2a25e92174 100644 --- a/nrf5/modmachine.c +++ b/nrf5/modmachine.c @@ -39,6 +39,7 @@ #include "gccollect.h" #include "pin.h" #include "spi.h" +#include "i2c.h" #if MICROPY_PY_MACHINE_PWM #include "pwm.h" #endif @@ -171,6 +172,9 @@ STATIC const mp_map_elem_t machine_module_globals_table[] = { #if MICROPY_PY_MACHINE_HW_SPI { MP_OBJ_NEW_QSTR(MP_QSTR_SPI), (mp_obj_t)&machine_hard_spi_type }, #endif +#if MICROPY_PY_MACHINE_HW_I2C + { MP_OBJ_NEW_QSTR(MP_QSTR_I2C), (mp_obj_t)&machine_i2c_type }, +#endif #if MICROPY_PY_MACHINE_ADC { MP_OBJ_NEW_QSTR(MP_QSTR_ADC), (mp_obj_t)&machine_adc_type }, #endif