diff --git a/unix/modmachine.c b/unix/modmachine.c index 23da653641..166d47712d 100644 --- a/unix/modmachine.c +++ b/unix/modmachine.c @@ -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 @@ -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); diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h index 33b0cc4503..06c4edc1e2 100644 --- a/unix/mpconfigport.h +++ b/unix/mpconfigport.h @@ -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