mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-12 11:42:13 -04:00
Send CaptureThread error into app-local message queue.
This commit is contained in:
parent
76c5fe96af
commit
cfaa44b02a
5 changed files with 42 additions and 17 deletions
|
@ -77,9 +77,11 @@ Thread* CaptureThread::thread = nullptr;
|
|||
CaptureThread::CaptureThread(
|
||||
std::unique_ptr<Writer> writer,
|
||||
size_t write_size,
|
||||
size_t buffer_count
|
||||
size_t buffer_count,
|
||||
std::function<void(File::Error)>&& error_callback
|
||||
) : config { write_size, buffer_count },
|
||||
writer { std::move(writer) }
|
||||
writer { std::move(writer) },
|
||||
error_callback { std::move(error_callback) }
|
||||
{
|
||||
// Need significant stack for FATFS
|
||||
thread = chThdCreateFromHeap(NULL, 1024, NORMALPRIO + 10, CaptureThread::static_fn, this);
|
||||
|
@ -94,10 +96,6 @@ CaptureThread::~CaptureThread() {
|
|||
}
|
||||
}
|
||||
|
||||
const Optional<File::Error>& CaptureThread::error() const {
|
||||
return last_error;
|
||||
}
|
||||
|
||||
void CaptureThread::check_fifo_isr() {
|
||||
// TODO: Prevent over-signalling by transmitting a set of
|
||||
// flags from the baseband core.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue