mirror of
https://github.com/polhenarejos/pico-keys-sdk.git
synced 2026-07-14 17:45:06 +01:00
Add sanity check to ensure core1 in async flash commits.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -266,6 +266,13 @@ static bool low_flash_available(void) {
|
||||
}
|
||||
|
||||
bool low_flash_commit_sync(uint32_t timeout_ms) {
|
||||
#if defined(PICO_PLATFORM)
|
||||
// Core 0 owns low_flash_task(). Waiting for it from core 0 would prevent
|
||||
// the queued flash operation from ever being serviced.
|
||||
if (get_core_num() != 1) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
low_flash_commit();
|
||||
|
||||
uint32_t start = board_millis();
|
||||
|
||||
Reference in New Issue
Block a user