unix/modmachine: Enable time_pulse_us() function.
This commit is contained in:
parent
41167554e4
commit
e68811dbbf
@ -32,6 +32,7 @@
|
||||
|
||||
#include "extmod/machine_mem.h"
|
||||
#include "extmod/machine_pinbase.h"
|
||||
#include "extmod/machine_pulse.h"
|
||||
|
||||
#if MICROPY_PLAT_DEV_MEM
|
||||
#include <errno.h>
|
||||
@ -81,6 +82,9 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_mem32), MP_ROM_PTR(&machine_mem32_obj) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_PinBase), MP_ROM_PTR(&machine_pinbase_type) },
|
||||
#if MICROPY_PY_MACHINE_PULSE
|
||||
{ MP_ROM_QSTR(MP_QSTR_time_pulse_us), MP_ROM_PTR(&machine_time_pulse_us_obj) },
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC MP_DEFINE_CONST_DICT(machine_module_globals, machine_module_globals_table);
|
||||
|
@ -120,6 +120,7 @@
|
||||
#define MICROPY_PY_USELECT (1)
|
||||
#endif
|
||||
#define MICROPY_PY_MACHINE (1)
|
||||
#define MICROPY_PY_MACHINE_PULSE (1)
|
||||
#define MICROPY_MACHINE_MEM_GET_READ_ADDR mod_machine_mem_get_addr
|
||||
#define MICROPY_MACHINE_MEM_GET_WRITE_ADDR mod_machine_mem_get_addr
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user