DRV_SST26_GeometryGet Function
C
bool DRV_SST26_GeometryGet( const DRV_HANDLE handle, SST26_GEOMETRY *geometry );
Summary
Returns the geometry of the device.
Description
This API gives the following geometrical details of the SST26 Flash:
Number of Read/Write/Erase Blocks and their size in each region of the device
Flash block start address.
Precondition
The DRV_SST26_Open() routine must have been called for the specified SST26 driver instance.
Parameters
Param | Description |
---|---|
handle | A valid open-instance handle, returned from the driver's open routine |
*geometry_table | pointer to flash device geometry table instance |
Returns
true - if able to get the geometry details of the flash
false - if read device id fails
Example
DRV_HANDLE handle; // Returned from DRV_SST26_Open DRV_SST26_GEOMETRY sst26FlashGeometry; uint32_t readBlockSize, writeBlockSize, eraseBlockSize; uint32_t nReadBlocks, nReadRegions, totalFlashSize; DRV_SST26_GeometryGet(handle, &sst26FlashGeometry); readBlockSize = sst26FlashGeometry.read_blockSize; nReadBlocks = sst26FlashGeometry.read_numBlocks; nReadRegions = sst26FlashGeometry.numReadRegions; writeBlockSize = sst26FlashGeometry.write_blockSize; eraseBlockSize = sst26FlashGeometry.erase_blockSize; totalFlashSize = readBlockSize * nReadBlocks * nReadRegions;
Remarks
This API is more useful when used to interface with Memory driver.