diff --git a/nrf5/modmachine.c b/nrf5/modmachine.c index 7f6a52fc20..1826135baa 100644 --- a/nrf5/modmachine.c +++ b/nrf5/modmachine.c @@ -42,6 +42,10 @@ #if MICROPY_PY_MACHINE_PWM #include "pwm.h" #endif +#if MICROPY_PY_MACHINE_ADC +#include "adc.h" +#endif + #define PYB_RESET_HARD (0) #define PYB_RESET_WDT (1) @@ -167,7 +171,9 @@ STATIC const mp_map_elem_t machine_module_globals_table[] = { #if MICROPY_PY_MACHINE_SPI { MP_OBJ_NEW_QSTR(MP_QSTR_SPI), (mp_obj_t)&machine_hard_spi_type }, #endif - +#if MICROPY_PY_MACHINE_ADC + { MP_OBJ_NEW_QSTR(MP_QSTR_ADC), (mp_obj_t)&machine_adc_type }, +#endif #if MICROPY_PY_MACHINE_PWM { MP_OBJ_NEW_QSTR(MP_QSTR_PWM), (mp_obj_t)&machine_hard_pwm_type }, #endif