Browse Source

Fix IntervalTimer on Teensy LC

teensy4-core
PaulStoffregen 7 years ago
parent
commit
71740491ed
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      teensy3/IntervalTimer.cpp

+ 4
- 0
teensy3/IntervalTimer.cpp View File

@@ -84,7 +84,11 @@ bool IntervalTimer::beginCycles(void (*funct)(), uint32_t cycles)
void IntervalTimer::end() {
if (channel) {
int index = channel - KINETISK_PIT_CHANNELS;
#if defined(KINETISK)
NVIC_DISABLE_IRQ(IRQ_PIT_CH0 + index);
#elif defined(KINETISL)
// TODO: disable IRQ_PIT, but only if both instances ended
#endif
funct_table[index] = dummy_funct;
channel->TCTRL = 0;
#if defined(KINETISL)

Loading…
Cancel
Save