class Timer -- control internal timers

Note: Memory can't be allocated during a callback (an interrupt) and so exceptions raised within a callback don't give much information. See micropython.alloc_emergency_exception_buf() for how to get around this limitation.

Constructors

class pyb.Timer(id, ...)

Methods

Timer.deinit()

Deinitialises the timer.

Disables any channel callbacks (and the associated irq). Stops the timer, and disables the timer peripheral.

class TimerChannel --- setup a channel for a timer

Timer channels are used to generate/capture a signal using a timer.

TimerChannel objects are created using the Timer.channel() method.

Methods