mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2024-12-14 20:18:13 +00:00
Hide CaptureThread event mask, only used internally.
This commit is contained in:
parent
0da48b099c
commit
dbc2a5c9ea
@ -92,7 +92,7 @@ CaptureThread::CaptureThread(
|
|||||||
CaptureThread::~CaptureThread() {
|
CaptureThread::~CaptureThread() {
|
||||||
if( thread ) {
|
if( thread ) {
|
||||||
chThdTerminate(thread);
|
chThdTerminate(thread);
|
||||||
chEvtSignal(thread, EVT_MASK_CAPTURE_THREAD);
|
chEvtSignal(thread, event_mask_loop_wake);
|
||||||
chThdWait(thread);
|
chThdWait(thread);
|
||||||
thread = nullptr;
|
thread = nullptr;
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ void CaptureThread::check_fifo_isr() {
|
|||||||
const auto fifo = StreamOutput::fifo_buffers_full;
|
const auto fifo = StreamOutput::fifo_buffers_full;
|
||||||
if( fifo ) {
|
if( fifo ) {
|
||||||
if( !fifo->is_empty() ) {
|
if( !fifo->is_empty() ) {
|
||||||
chEvtSignalI(thread, EVT_MASK_CAPTURE_THREAD);
|
chEvtSignalI(thread, event_mask_loop_wake);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -125,7 +125,7 @@ Optional<File::Error> CaptureThread::run() {
|
|||||||
}
|
}
|
||||||
stream.release_buffer(buffer);
|
stream.release_buffer(buffer);
|
||||||
} else {
|
} else {
|
||||||
chEvtWaitAny(EVT_MASK_CAPTURE_THREAD);
|
chEvtWaitAny(event_mask_loop_wake);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +57,8 @@ public:
|
|||||||
static void check_fifo_isr();
|
static void check_fifo_isr();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
static constexpr auto event_mask_loop_wake = EVENT_MASK(0);
|
||||||
|
|
||||||
CaptureConfig config;
|
CaptureConfig config;
|
||||||
std::unique_ptr<Writer> writer;
|
std::unique_ptr<Writer> writer;
|
||||||
Optional<File::Error> last_error;
|
Optional<File::Error> last_error;
|
||||||
|
@ -44,7 +44,6 @@ constexpr auto EVT_MASK_SWITCHES = EVENT_MASK(3);
|
|||||||
constexpr auto EVT_MASK_ENCODER = EVENT_MASK(4);
|
constexpr auto EVT_MASK_ENCODER = EVENT_MASK(4);
|
||||||
constexpr auto EVT_MASK_TOUCH = EVENT_MASK(5);
|
constexpr auto EVT_MASK_TOUCH = EVENT_MASK(5);
|
||||||
constexpr auto EVT_MASK_APPLICATION = EVENT_MASK(6);
|
constexpr auto EVT_MASK_APPLICATION = EVENT_MASK(6);
|
||||||
constexpr auto EVT_MASK_CAPTURE_THREAD = EVENT_MASK(7);
|
|
||||||
|
|
||||||
class EventDispatcher {
|
class EventDispatcher {
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user