Closed HaoboGu closed 4 months ago
the softdevice api is only async (you request the write/erase operation, you get an event later notifying it was done). We can't spin waiting for the operation to be done, because it'll starve the softdevice task so the event won't get processed. Same if you try to use block_on()
from your side to convert the async api to blocking.
gotcha! thanks for the explanation:D
In current flash implementation https://github.com/embassy-rs/nrf-softdevice/blob/master/nrf-softdevice/src/flash.rs, the struct
Flash
implements only blockingReadNorFlash
, and async version ofReadNorFlash
andNorFlash
. Is there any concern to not implement blockingNorFlash
?