-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Right now, the write/erase methods of NorFlash
(and friends) don't clarify whether they guarantee that the actual operation has COMPLETED or not.
Today I was writing an impl for the mx25r
chip (here, and @diondokter pointed out that I was doing my "wait not busy" loops BEFORE doing operations, instead of after. This is nice, because we can move on as soon as the data/command is sent.
HOWEVER, if a user expects that write/erase are COMPLETE when the function returns, they might immediately shut down the external flash, even though the write/erase operation is still ongoing.
IMO, we should EITHER:
- Update the docs to say that the existing methods should only return when the operation is COMPLETE, e.g. you should spin on the busy bit after performing the operation, OR
- Add a
flush
method (this is probably a breaking change), that allows users to separate that when necessary.
Metadata
Metadata
Assignees
Labels
No labels