mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-23 17:01:31 -04:00
Move FIFO and write size to CaptureConfig structure.
Now configured from baseband, where write size and appropriate FIFO size is known.
This commit is contained in:
parent
01fc6b9bc9
commit
91ee2dbb67
13 changed files with 71 additions and 32 deletions
|
@ -70,6 +70,10 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool is_empty() const {
|
||||
return fifo.is_empty();
|
||||
}
|
||||
|
||||
private:
|
||||
FIFO<uint8_t> fifo;
|
||||
Mutex mutex_write;
|
||||
|
@ -92,10 +96,6 @@ private:
|
|||
return fifo.len();
|
||||
}
|
||||
|
||||
bool is_empty() const {
|
||||
return fifo.is_empty();
|
||||
}
|
||||
|
||||
bool push(const void* const buf, const size_t len) {
|
||||
chMtxLock(&mutex_write);
|
||||
const auto result = fifo.in_r(buf, len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue