Consolidate event handler code, including IRQ.

This commit is contained in:
Jared Boone 2016-01-04 12:15:10 -08:00
parent b058c0fe00
commit 69b258cc2b
4 changed files with 16 additions and 73 deletions

View file

@ -33,7 +33,6 @@
#include "ui_painter.hpp"
#include "ui_navigation.hpp"
#include "irq_ipc.hpp"
#include "irq_lcd_frame.hpp"
#include "irq_controls.hpp"
#include "irq_rtc.hpp"
@ -55,6 +54,22 @@ using namespace lpc43xx;
#include <string.h>
extern "C" {
CH_IRQ_HANDLER(M4Core_IRQHandler) {
CH_IRQ_PROLOGUE();
chSysLockFromIsr();
events_flag_isr(EVT_MASK_APPLICATION);
chSysUnlockFromIsr();
creg::m4txevent::clear();
CH_IRQ_EPILOGUE();
}
}
class EventDispatcher {
public:
EventDispatcher(