Merge pull request #8639 from offirko/offir-mbed-qspif3

Add get_erase_value() support
pull/8672/head
Cruz Monrreal 2018-11-06 14:44:25 -06:00 committed by GitHub
commit 6042ea30d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -514,6 +514,11 @@ bd_size_t QSPIFBlockDevice::size() const
return _device_size_bytes;
}
int QSPIFBlockDevice::get_erase_value() const
{
return 0xFF;
}
/********************************/
/* Different Device Csel Mgmt */
/********************************/

View File

@ -191,6 +191,17 @@ public:
*/
virtual bd_size_t get_erase_size(bd_addr_t addr);
/** Get the value of storage byte after it was erased
*
* If get_erase_value returns a non-negative byte value, the underlying
* storage is set to that value when erased, and storage containing
* that value can be programmed without another erase.
*
* @return The value of storage when erased, or -1 if you can't
* rely on the value of erased storage
*/
virtual int get_erase_value() const;
/** Get the total size of the underlying device
*
* @return Size of the underlying device in bytes