diff options
| author | Damien George <damien@micropython.org> | 2023-10-11 13:48:49 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-10-23 17:16:45 +1100 |
| commit | 95d8b5fd555ba26ebd79b29fade45d2bf0abc6c4 (patch) | |
| tree | cff4cb6867f00c45c9f1df4489ea036ea964e9ca /ports/esp32/modmachine.c | |
| parent | 48e0986666c9f2059c92253f3c0f9b4184d68816 (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/esp32/modmachine.c')
| -rw-r--r-- | ports/esp32/modmachine.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/esp32/modmachine.c b/ports/esp32/modmachine.c index fe6d18e78..b1c9011cb 100644 --- a/ports/esp32/modmachine.c +++ b/ports/esp32/modmachine.c @@ -312,7 +312,9 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { #if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 { MP_ROM_QSTR(MP_QSTR_TouchPad), MP_ROM_PTR(&machine_touchpad_type) }, #endif + #if MICROPY_PY_MACHINE_ADC { MP_ROM_QSTR(MP_QSTR_ADC), MP_ROM_PTR(&machine_adc_type) }, + #endif { MP_ROM_QSTR(MP_QSTR_ADCBlock), MP_ROM_PTR(&machine_adcblock_type) }, #if MICROPY_PY_MACHINE_DAC { MP_ROM_QSTR(MP_QSTR_DAC), MP_ROM_PTR(&machine_dac_type) }, |
