Implement the get_erase_size API (based on address)

pull/7774/head
David Saada 2018-07-04 16:36:11 +03:00
parent 78c4f98b80
commit dce716d6d4
2 changed files with 13 additions and 0 deletions

View File

@ -329,6 +329,11 @@ bd_size_t SPIFBlockDevice::get_erase_size() const
return SPIF_SE_SIZE;
}
bd_size_t SPIFBlockDevice::get_erase_size(bd_addr_t addr) const
{
return SPIF_SE_SIZE;
}
bd_size_t SPIFBlockDevice::size() const
{
return _size;

View File

@ -130,6 +130,14 @@ public:
*/
virtual bd_size_t get_erase_size() const;
/** Get the size of an erasable block given address
*
* @param addr Address within the erasable block
* @return Size of an erasable block in bytes
* @note Must be a multiple of the program size
*/
virtual bd_size_t get_erase_size(bd_addr_t addr) const;
/** Get the value of storage when erased
*
* If get_erase_value returns a non-negative byte value, the underlying