Skip to content

Commit

Permalink
SnapProcessorRP2040 blocking read
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Jan 16, 2025
1 parent 975a715 commit 88b7abe
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/api/SnapProcessorRP2040.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@ class SnapProcessorRP2040 : public SnapProcessor {
ESP_LOGW(TAG, "begin: %d", buffer_count * 1024);
// regular begin logic
bool result = SnapProcessor::begin();
// allocate buffer, so that we could use psram
size_queue.resize(RTOS_MAX_QUEUE_ENTRY_COUNT);

// allocate buffer
buffer.setBlockingRead(true);
buffer.setBlockingWrite(true);
buffer.resize(buffer_count * 1024);

// we need to read back the buffer with the written sizes
size_queue.resize(RTOS_MAX_QUEUE_ENTRY_COUNT);

is_active = false;
return result;
}
Expand Down

0 comments on commit 88b7abe

Please sign in to comment.