mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 10:27:45 +00:00
Hide FIFO hack inside StreamOutput.
First step in a long refactor and evolution of the capture code.
This commit is contained in:
@@ -38,8 +38,7 @@ using namespace hackrf::one;
|
|||||||
class StreamOutput {
|
class StreamOutput {
|
||||||
public:
|
public:
|
||||||
StreamOutput(
|
StreamOutput(
|
||||||
FIFO<uint8_t>* const fifo
|
) : fifo { reinterpret_cast<FIFO<uint8_t>*>(shared_memory.FIFO_HACK) }
|
||||||
) : fifo { fifo }
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,12 +103,7 @@ private:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto fifo = reinterpret_cast<FIFO<uint8_t>*>(shared_memory.FIFO_HACK);
|
StreamOutput stream;
|
||||||
if( !fifo ) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
StreamOutput stream { fifo };
|
|
||||||
|
|
||||||
while( !chThdShouldTerminate() ) {
|
while( !chThdShouldTerminate() ) {
|
||||||
chEvtWaitAny(EVT_FIFO_HIGHWATER);
|
chEvtWaitAny(EVT_FIFO_HIGHWATER);
|
||||||
|
Reference in New Issue
Block a user