mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-10-19 08:31:58 +00:00
Send CaptureThread error into app-local message queue.
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user