mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-12 11:42:13 -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
|
@ -40,6 +40,8 @@
|
|||
#include "hackrf_hal.hpp"
|
||||
using namespace hackrf::one;
|
||||
|
||||
static Thread* thread_controls_event = NULL;
|
||||
|
||||
static std::array<Debounce, 7> switch_debounce;
|
||||
|
||||
static Encoder encoder;
|
||||
|
@ -156,7 +158,7 @@ void timer0_callback(GPTDriver* const) {
|
|||
/* Signal event loop */
|
||||
if( event_mask ) {
|
||||
chSysLockFromIsr();
|
||||
EventDispatcher::events_flag_isr(event_mask);
|
||||
chEvtSignalI(thread_controls_event, event_mask);
|
||||
chSysUnlockFromIsr();
|
||||
}
|
||||
}
|
||||
|
@ -176,6 +178,8 @@ static GPTConfig timer0_config {
|
|||
};
|
||||
|
||||
void controls_init() {
|
||||
thread_controls_event = chThdSelf();
|
||||
|
||||
touch::adc::start();
|
||||
|
||||
/* GPT timer 0 is used to scan user interface controls -- touch screen,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue