diff options
| author | robert-hh <robert@hammelrath.com> | 2022-10-27 16:59:36 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-11-09 15:57:46 +1100 |
| commit | 2426ddb57502dc80248d1f8a9c8264eaab6d9a0b (patch) | |
| tree | 12924aa63ea866f6a500b022bd1a61a8cf9cad33 | |
| parent | acadc0a7dc268edc37d33651f1a9788cf45cbb19 (diff) | |
stm32/modmachine: Move dht_readinto() to the machine module.
| -rw-r--r-- | ports/stm32/modmachine.c | 2 | ||||
| -rw-r--r-- | ports/stm32/modpyb.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/ports/stm32/modmachine.c b/ports/stm32/modmachine.c index 06fdd0e2c..f51a2fd70 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 96e719c6b..7f87dd582 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 |
