Eliminate duplicate code between event_m4.hpp, event.hpp.

event.* is common code, _m0 and _m4 contain specific event mask definitions.
This commit is contained in:
Jared Boone
2016-01-04 12:54:05 -08:00
parent 229c1e9a3c
commit c1e5577669
9 changed files with 19 additions and 38 deletions

View File

@@ -22,25 +22,9 @@
#ifndef __EVENT_M4_H__
#define __EVENT_M4_H__
#include "ch.h"
#include "event.hpp"
constexpr auto EVT_MASK_BASEBAND = EVENT_MASK(0);
constexpr auto EVT_MASK_SPECTRUM = EVENT_MASK(1);
void events_initialize(Thread* const event_loop_thread);
extern Thread* thread_event_loop;
inline void events_flag(const eventmask_t events) {
if( thread_event_loop ) {
chEvtSignal(thread_event_loop, events);
}
}
inline void events_flag_isr(const eventmask_t events) {
if( thread_event_loop ) {
chEvtSignalI(thread_event_loop, events);
}
}
#endif/*__EVENT_M4_H__*/