mbed-os/storage/blockdevice/include/blockdevice
Lingkai Dong b5e7dd9d32 SFDP: Add more parameters to the reader callback
The SFDP functions parse SFDP data which is fetched by a callback
called `sfdp_reader` provided by {SPIF,QSPIF,OSPIF}BlockDevice.
Currently, this callback interface only takes a read address and an RX
buffer to store output data. This has been enough, because other SPI
parameters are always the same when fetching the SFDP table only -
they are just hardcoded in each reader.

But in the future we will add support for flash devices with multiple
configurations (in a subsequent commit), and to detect which
configuration is enabled, we will need to send detection commands
which require device-dependent SPI parameters:
* address size
* instruction
* dummy cycles

This commit
* turns the above SPI parameters from predefined/hardcoded values
into parameters of the callback
* lets the SFDP functions pass the above parameters to the callback
(Note: To read the SFDP table itself, those values are constants
defined by the standard, not tied to any particular device, so they
can be known to the SFDP functions)
* updates the callbacks implemented by {SPIF,QSPIF,OSPIF}BlockDevice
* updates the mock callback for unit tests and expectations
2021-09-10 09:46:02 +01:00
..
internal SFDP: Add more parameters to the reader callback 2021-09-10 09:46:02 +01:00
BlockDevice.h Add SPDX license identifier to Arm files 2020-10-15 10:47:27 +01:00
BufferedBlockDevice.h Add SPDX identifier 2020-12-15 15:01:25 +00:00
ChainingBlockDevice.h Add SPDX identifier 2020-12-15 15:01:25 +00:00
ExhaustibleBlockDevice.h Refactor storage/blockdevice directory 2020-07-17 03:10:58 -07:00
FlashSimBlockDevice.h Add SPDX identifier 2020-12-15 15:01:25 +00:00
HeapBlockDevice.h HeapBlockDevice::erase(): free up heap memory 2021-04-14 17:00:17 +01:00
MBRBlockDevice.h Add SPDX identifier 2020-12-15 15:01:25 +00:00
ObservingBlockDevice.h Add SPDX identifier 2020-12-15 15:01:25 +00:00
ProfilingBlockDevice.h Add SPDX identifier 2020-12-15 15:01:25 +00:00
ReadOnlyBlockDevice.h Add SPDX identifier 2020-12-15 15:01:25 +00:00
SlicingBlockDevice.h Add SPDX identifier 2020-12-15 15:01:25 +00:00