Commit Graph

2 Commits

Author SHA1 Message Date
Damien George
d7cd1d2027 stm32/timer: Make pyb.Timer() instances persistent.
Prior to this patch calling pyb.Timer(id) would always create a new timer
instance, even if there was an existing one.  This patch fixes this
behaviour to match other peripherals, like UART, such that constructing a
timer with just the id will retrieve any existing instances.

The patch also refactors the way timers are validated on construction to
simplify and reduce code size.
2017-09-13 16:20:42 +10:00
Damien George
01dd7804b8 ports: Make new ports/ sub-directory and move all ports there.
This is to keep the top-level directory clean, to make it clear what is
core and what is a port, and to allow the repository to grow with new ports
in a sustainable way.
2017-09-06 13:40:51 +10:00