mimxrt/modmachine: Move dht_readinto() to the machine module.

This commit is contained in:
robert-hh 2022-10-25 10:50:09 +02:00 committed by Damien George
parent 3bb371c5f2
commit 8afa6df23d
2 changed files with 2 additions and 3 deletions

View File

@ -26,6 +26,7 @@
*/
#include "py/runtime.h"
#include "drivers/dht/dht.h"
#include "extmod/machine_bitstream.h"
#include "extmod/machine_mem.h"
#include "extmod/machine_i2c.h"
@ -149,6 +150,7 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_bitstream), MP_ROM_PTR(&machine_bitstream_obj) },
#endif
{ MP_ROM_QSTR(MP_QSTR_time_pulse_us), MP_ROM_PTR(&machine_time_pulse_us_obj) },
{ MP_ROM_QSTR(MP_QSTR_dht_readinto), MP_ROM_PTR(&dht_readinto_obj) },
// Reset reasons
{ MP_ROM_QSTR(MP_QSTR_PWRON_RESET), MP_ROM_INT(MP_PWRON_RESET) },

View File

@ -26,14 +26,11 @@
#include "py/mperrno.h"
#include "py/runtime.h"
#include "drivers/dht/dht.h"
#include "modmimxrt.h"
STATIC const mp_rom_map_elem_t mimxrt_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_mimxrt) },
{ MP_ROM_QSTR(MP_QSTR_Flash), MP_ROM_PTR(&mimxrt_flash_type) },
{ MP_ROM_QSTR(MP_QSTR_dht_readinto), MP_ROM_PTR(&dht_readinto_obj) },
};
STATIC MP_DEFINE_CONST_DICT(mimxrt_module_globals, mimxrt_module_globals_table);