A little code consolidation -- M0APP IRQ.

This commit is contained in:
Jared Boone 2016-01-04 10:12:18 -08:00
parent cd17f414b7
commit 778e2d2381
6 changed files with 31 additions and 87 deletions

View file

@ -21,6 +21,9 @@
#include "event_m4.hpp"
#include "lpc43xx_cpp.hpp"
using namespace lpc43xx;
#include "ch.h"
Thread* thread_event_loop = nullptr;
@ -28,3 +31,19 @@ Thread* thread_event_loop = nullptr;
void events_initialize(Thread* const event_loop_thread) {
thread_event_loop = event_loop_thread;
}
extern "C" {
CH_IRQ_HANDLER(MAPP_IRQHandler) {
CH_IRQ_PROLOGUE();
chSysLockFromIsr();
events_flag_isr(EVT_MASK_BASEBAND);
chSysUnlockFromIsr();
creg::m0apptxevent::clear();
CH_IRQ_EPILOGUE();
}
}