mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-23 13:08:13 +00:00
Move event.* code into event_m[04].*.
Slightly more duplication of code now. Need a base class...
This commit is contained in:
@@ -22,9 +22,3 @@
|
||||
#include "event.hpp"
|
||||
|
||||
#include "ch.h"
|
||||
|
||||
Thread* thread_event_loop = nullptr;
|
||||
|
||||
void events_initialize(Thread* const event_loop_thread) {
|
||||
thread_event_loop = event_loop_thread;
|
||||
}
|
||||
|
@@ -24,20 +24,4 @@
|
||||
|
||||
#include "ch.h"
|
||||
|
||||
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_H__*/
|
||||
|
Reference in New Issue
Block a user