Skip to content

Commit 2426ddb

Browse files
robert-hhdpgeorge
authored andcommitted
stm32/modmachine: Move dht_readinto() to the machine module.
1 parent acadc0a commit 2426ddb

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

ports/stm32/modmachine.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "py/runtime.h"
3333
#include "py/mperrno.h"
3434
#include "py/mphal.h"
35+
#include "drivers/dht/dht.h"
3536
#include "extmod/machine_bitstream.h"
3637
#include "extmod/machine_mem.h"
3738
#include "extmod/machine_signal.h"
@@ -412,6 +413,7 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
412413
#if MICROPY_PY_MACHINE_PULSE
413414
{ MP_ROM_QSTR(MP_QSTR_time_pulse_us), MP_ROM_PTR(&machine_time_pulse_us_obj) },
414415
#endif
416+
{ MP_ROM_QSTR(MP_QSTR_dht_readinto), MP_ROM_PTR(&dht_readinto_obj) },
415417

416418
{ MP_ROM_QSTR(MP_QSTR_mem8), MP_ROM_PTR(&machine_mem8_obj) },
417419
{ MP_ROM_QSTR(MP_QSTR_mem16), MP_ROM_PTR(&machine_mem16_obj) },

ports/stm32/modpyb.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "py/runtime.h"
3131
#include "py/mphal.h"
3232
#include "shared/runtime/pyexec.h"
33-
#include "drivers/dht/dht.h"
3433
#include "stm32_it.h"
3534
#include "irq.h"
3635
#include "led.h"
@@ -191,9 +190,6 @@ STATIC const mp_rom_map_elem_t pyb_module_globals_table[] = {
191190
{ MP_ROM_QSTR(MP_QSTR_mount), MP_ROM_PTR(&mp_vfs_mount_obj) },
192191
#endif
193192

194-
// This function is not intended to be public and may be moved elsewhere
195-
{ MP_ROM_QSTR(MP_QSTR_dht_readinto), MP_ROM_PTR(&dht_readinto_obj) },
196-
197193
{ MP_ROM_QSTR(MP_QSTR_Timer), MP_ROM_PTR(&pyb_timer_type) },
198194

199195
#if MICROPY_HW_ENABLE_RNG

0 commit comments

Comments
 (0)