mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
mimxrt: Add the Timer class to the machine module.
It supports three hardware timer channels based on the PIT timers of the MIMXRT MCU. The timer id's are 0, 1 and 2. On soft reboot all active timers will be stopped via finalisers.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "extmod/machine_mem.h"
|
||||
#include "led.h"
|
||||
#include "pin.h"
|
||||
#include "modmachine.h"
|
||||
|
||||
#include CPU_HEADER_H
|
||||
|
||||
@@ -54,6 +55,7 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&machine_led_type) },
|
||||
#endif
|
||||
{ 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_DEFINE_CONST_DICT(machine_module_globals, machine_module_globals_table);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user