diff --git a/ports/stm32/modmachine.c b/ports/stm32/modmachine.c index 06fdd0e2c1..f51a2fd703 100644 --- a/ports/stm32/modmachine.c +++ b/ports/stm32/modmachine.c @@ -32,6 +32,7 @@ #include "py/runtime.h" #include "py/mperrno.h" #include "py/mphal.h" +#include "drivers/dht/dht.h" #include "extmod/machine_bitstream.h" #include "extmod/machine_mem.h" #include "extmod/machine_signal.h" @@ -412,6 +413,7 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { #if MICROPY_PY_MACHINE_PULSE { MP_ROM_QSTR(MP_QSTR_time_pulse_us), MP_ROM_PTR(&machine_time_pulse_us_obj) }, #endif + { MP_ROM_QSTR(MP_QSTR_dht_readinto), MP_ROM_PTR(&dht_readinto_obj) }, { MP_ROM_QSTR(MP_QSTR_mem8), MP_ROM_PTR(&machine_mem8_obj) }, { MP_ROM_QSTR(MP_QSTR_mem16), MP_ROM_PTR(&machine_mem16_obj) }, diff --git a/ports/stm32/modpyb.c b/ports/stm32/modpyb.c index 96e719c6bf..7f87dd5820 100644 --- a/ports/stm32/modpyb.c +++ b/ports/stm32/modpyb.c @@ -30,7 +30,6 @@ #include "py/runtime.h" #include "py/mphal.h" #include "shared/runtime/pyexec.h" -#include "drivers/dht/dht.h" #include "stm32_it.h" #include "irq.h" #include "led.h" @@ -191,9 +190,6 @@ STATIC const mp_rom_map_elem_t pyb_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_mount), MP_ROM_PTR(&mp_vfs_mount_obj) }, #endif - // This function is not intended to be public and may be moved elsewhere - { MP_ROM_QSTR(MP_QSTR_dht_readinto), MP_ROM_PTR(&dht_readinto_obj) }, - { MP_ROM_QSTR(MP_QSTR_Timer), MP_ROM_PTR(&pyb_timer_type) }, #if MICROPY_HW_ENABLE_RNG