Skip to content

Commit 2e23e9c

Browse files
committed
ATTENTION: refactor irqmanager::addPeripheral
The best solution would be to rewrite everything from scratch, but this should be good enough as long as avery irq is set to FSP_INVALID_VECTOR in the various objects' contructor (NOT in the begin()) Fixes arduino#75
1 parent 15764d4 commit 2e23e9c

File tree

6 files changed

+253
-332
lines changed

6 files changed

+253
-332
lines changed

cores/arduino/FspTimer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ TimerAvail_t FspTimer::agt_used_channel[AGT_HOWMANY] = { TIMER_FREE };
1414
FspTimer::FspTimer(): init_ok(false), agt_timer(nullptr), gpt_timer(nullptr), type(GPT_TIMER) {
1515
// AGT0 is always used for timekeeping (millis() and micros())
1616
// agt_used_channel[0] = TIMER_USED;
17+
timer_cfg.cycle_end_irq = FSP_INVALID_VECTOR;
1718
}
1819

1920
FspTimer::~FspTimer() {
@@ -72,7 +73,6 @@ bool FspTimer::begin(timer_mode_t mode, uint8_t tp, uint8_t channel, uint32_t pe
7273
timer_cfg.p_context = ctx;
7374
timer_cfg.p_extend = nullptr;
7475
timer_cfg.cycle_end_ipl = (BSP_IRQ_DISABLED);
75-
timer_cfg.cycle_end_irq = FSP_INVALID_VECTOR;
7676

7777
if(tp == GPT_TIMER) {
7878
type = GPT_TIMER;

0 commit comments

Comments
 (0)