nrf5: Adding i2c class to machine module globals table.

This commit is contained in:
Glenn Ruben Bakke 2017-01-29 16:41:18 +01:00
parent bfc67dd99c
commit fec5c75068
1 changed files with 4 additions and 0 deletions

View File

@ -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