summaryrefslogtreecommitdiff
path: root/ports/stm32/modmachine.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-10-11 13:48:49 +1100
committerDamien George <damien@micropython.org>2023-10-23 17:16:45 +1100
commit95d8b5fd555ba26ebd79b29fade45d2bf0abc6c4 (patch)
treecff4cb6867f00c45c9f1df4489ea036ea964e9ca /ports/stm32/modmachine.c
parent48e0986666c9f2059c92253f3c0f9b4184d68816 (diff)
extmod/machine_adc: Factor ports' ADC Python bindings to common code.
No functional change, just code factoring to have the Python bindings in one location, and all the ports use those same bindings. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/stm32/modmachine.c')
-rw-r--r--ports/stm32/modmachine.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/stm32/modmachine.c b/ports/stm32/modmachine.c
index a0e2da89f..070d0e116 100644
--- a/ports/stm32/modmachine.c
+++ b/ports/stm32/modmachine.c
@@ -430,7 +430,9 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_Signal), MP_ROM_PTR(&machine_signal_type) },
{ MP_ROM_QSTR(MP_QSTR_RTC), MP_ROM_PTR(&pyb_rtc_type) },
+ #if MICROPY_PY_MACHINE_ADC
{ MP_ROM_QSTR(MP_QSTR_ADC), MP_ROM_PTR(&machine_adc_type) },
+ #endif
#if MICROPY_PY_MACHINE_I2C
#if MICROPY_HW_ENABLE_HW_I2C
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&machine_i2c_type) },