mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-24 14:50:43 -04:00
IRQ: Make handlers more independent of EventDispatcher.
EventDispatcher is such a hairball...
This commit is contained in:
parent
f4fdc21c20
commit
bf7f5d2567
4 changed files with 18 additions and 17 deletions
|
@ -27,8 +27,11 @@
|
|||
using namespace lpc43xx;
|
||||
|
||||
#include "event_m0.hpp"
|
||||
|
||||
|
||||
static Thread* thread_rtc_event = NULL;
|
||||
|
||||
void rtc_interrupt_enable() {
|
||||
thread_rtc_event = chThdSelf();
|
||||
rtc::interrupt::enable_second_inc();
|
||||
nvicEnableVector(RTC_IRQn, CORTEX_PRIORITY_MASK(LPC_RTC_IRQ_PRIORITY));
|
||||
}
|
||||
|
@ -39,7 +42,7 @@ CH_IRQ_HANDLER(RTC_IRQHandler) {
|
|||
CH_IRQ_PROLOGUE();
|
||||
|
||||
chSysLockFromIsr();
|
||||
EventDispatcher::event_isr_rtc_tick();
|
||||
chEvtSignalI(thread_rtc_event, EVT_MASK_RTC_TICK);
|
||||
chSysUnlockFromIsr();
|
||||
|
||||
rtc::interrupt::clear_all();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue