DRV_SST39_GeometryGet Function
C
bool DRV_SST39_GeometryGet(const DRV_HANDLE handle, DRV_SST39_GEOMETRY *geometry)
Summary
Returns the geometry of the device.
Description
This API gives the following geometrical details of the DRV_SST39 PROM:
Number of Read/Write/Erase Blocks and their size in each region of the device.
Preconditions
DRV_SST39_Open must have been called to obtain a valid opened device handle.
Parameters
Param | Description |
---|---|
handle | A valid open-instance handle, returned from the driver's open routine |
geometry | Pointer to flash device geometry table instance |
Returns
True if able to get the geometry details of the flash. False if the handle is invalid or errors occurs.
Example
DRV_SST39_GEOMETRY flashGeometry; uint32_t readBlockSize, writeBlockSize, eraseBlockSize; uint32_t nReadBlocks, nReadRegions, totalFlashSize; DRV_SST39_GeometryGet(myHandle, &flashGeometry); readBlockSize = flashGeometry.readBlockSize; nReadBlocks = flashGeometry.readNumBlocks; nReadRegions = flashGeometry.readNumRegions; writeBlockSize = flashGeometry.writeBlockSize; eraseBlockSize = flashGeometry.eraseBlockSize; totalFlashSize = readBlockSize * nReadBlocks * nReadRegions;
Remarks
None.