summaryrefslogtreecommitdiff
path: root/ports/zephyr/modmachine.c
diff options
context:
space:
mode:
authordanicampora <danicampora@gmail.com>2025-02-21 14:51:45 +0100
committerDamien George <damien@micropython.org>2025-03-07 21:32:22 +1100
commit3823aeb0f14c04084eba6566164d9b7dbd9e7ced (patch)
tree7a9fa1c38175530a20edde8e45499cbdc9e9a3bd /ports/zephyr/modmachine.c
parentbe0fce942996af576acd2ac639a4be92f6c4eeb7 (diff)
zephyr/machine_timer: Add machine.Timer class implementation.
Simple `machine.Timer` implementation in-line with the rest of the MicroPython ports. Note: Only virtual timers are supported (not linked to any particular hardware peripheral). Tested with the nRF5340 and the nRF52840. Signed-off-by: danicampora <danicampora@gmail.com>
Diffstat (limited to 'ports/zephyr/modmachine.c')
-rw-r--r--ports/zephyr/modmachine.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ports/zephyr/modmachine.c b/ports/zephyr/modmachine.c
index bbb9280a5..89ad12f18 100644
--- a/ports/zephyr/modmachine.c
+++ b/ports/zephyr/modmachine.c
@@ -44,6 +44,7 @@
MICROPY_PY_MACHINE_RESET_ENTRY \
{ MP_ROM_QSTR(MP_QSTR_reset_cause), MP_ROM_PTR(&machine_reset_cause_obj) }, \
{ MP_ROM_QSTR(MP_QSTR_Pin), MP_ROM_PTR(&machine_pin_type) }, \
+ { MP_ROM_QSTR(MP_QSTR_Timer), MP_ROM_PTR(&machine_timer_type) }, \
static mp_obj_t machine_reset(void) {
sys_reboot(SYS_REBOOT_COLD);