mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-01-12 12:43:38 +00:00
Rename EVT_FIFO_HIGHWATER -> EVT_MASK_CAPTURE_THREAD.
This commit is contained in:
parent
3103e9b80e
commit
c585f3d4ea
@ -78,7 +78,7 @@ public:
|
||||
if( thread_tmp ) {
|
||||
thread = nullptr;
|
||||
chThdTerminate(thread_tmp);
|
||||
chEvtSignal(thread_tmp, EVT_FIFO_HIGHWATER);
|
||||
chEvtSignal(thread_tmp, EVT_MASK_CAPTURE_THREAD);
|
||||
const auto success = chThdWait(thread_tmp);
|
||||
|
||||
if( !success ) {
|
||||
@ -91,13 +91,12 @@ public:
|
||||
// TODO: Prevent over-signalling by transmitting a set of
|
||||
// flags from the baseband core.
|
||||
if( thread ) {
|
||||
chEvtSignalI(thread, EVT_FIFO_HIGHWATER);
|
||||
chEvtSignalI(thread, EVT_MASK_CAPTURE_THREAD);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
static constexpr size_t write_size = 16384;
|
||||
static constexpr eventmask_t EVT_FIFO_HIGHWATER = 1;
|
||||
|
||||
const std::string file_path;
|
||||
std::unique_ptr<std::array<uint8_t, write_size>> write_buffer;
|
||||
@ -117,7 +116,7 @@ private:
|
||||
StreamOutput stream;
|
||||
|
||||
while( !chThdShouldTerminate() ) {
|
||||
chEvtWaitAny(EVT_FIFO_HIGHWATER);
|
||||
chEvtWaitAny(EVT_MASK_CAPTURE_THREAD);
|
||||
|
||||
while( stream.available() >= write_buffer->size() ) {
|
||||
if( !transfer(stream, write_buffer.get()) ) {
|
||||
|
@ -43,6 +43,7 @@ constexpr auto EVT_MASK_SWITCHES = EVENT_MASK(3);
|
||||
constexpr auto EVT_MASK_ENCODER = EVENT_MASK(4);
|
||||
constexpr auto EVT_MASK_TOUCH = EVENT_MASK(5);
|
||||
constexpr auto EVT_MASK_APPLICATION = EVENT_MASK(6);
|
||||
constexpr auto EVT_MASK_CAPTURE_THREAD = EVENT_MASK(7);
|
||||
|
||||
class EventDispatcher {
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user