diff options
author | Dave Hylands <dhylands@gmail.com> | 2016-08-18 20:47:49 -0700 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-08-22 12:18:04 +1000 |
commit | c6983e3ce0bb9708afabb9fb7cbdf54ba46fb594 (patch) | |
tree | c0a99f6423316b70ce266d37a58ed99a28beb7f9 /py/objexcept.c | |
parent | f2a21a2489325df88acf14a20a286932ed32d500 (diff) | |
download | micropython-c6983e3ce0bb9708afabb9fb7cbdf54ba46fb594.tar.gz micropython-c6983e3ce0bb9708afabb9fb7cbdf54ba46fb594.zip |
stmhal: Fix timer capture/compare interrupt handling for TIM1 and TIM8.
It turns out that TIM1 and TIM8 have their own Capture/Compare
interrupt vector. For all of the other timers, the capture/compare
interrupt vector is the same as the update vector.
So we need to add handlers for these vectors and enable them
when using capture/compare callbacks.
During testing of this, I also found that passing a channel callback
into the channel constructor would not enable interrupts properly.
I tested using:
```
>>> pyb.Timer(1, freq=4).channel(1, pyb.Timer.OC_TOGGLE, callback=lambda t: print('.', end=''))
```
I tested the above with channels 1, 4, and 8
Diffstat (limited to 'py/objexcept.c')
0 files changed, 0 insertions, 0 deletions