File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -446,6 +446,13 @@ bd_size_t DataFlashBlockDevice::get_erase_size() const
446446 return _block_size;
447447}
448448
449+ bd_size_t DataFlashBlockDevice::get_erase_size (bd_addr_t addr) const
450+ {
451+ DEBUG_PRINTF (" erase size: %" PRIX16 " \r\n " , _block_size);
452+
453+ return _block_size;
454+ }
455+
449456bd_size_t DataFlashBlockDevice::size () const
450457{
451458 DEBUG_PRINTF (" device size: %" PRIX32 " \r\n " , _device_size);
Original file line number Diff line number Diff line change @@ -139,6 +139,14 @@ class DataFlashBlockDevice : public BlockDevice {
139139 */
140140 virtual bd_size_t get_erase_size () const ;
141141
142+ /* * Get the size of an erasable block given address
143+ *
144+ * @param addr Address within the erasable block
145+ * @return Size of an erasable block in bytes
146+ * @note Must be a multiple of the program size
147+ */
148+ virtual bd_size_t get_erase_size (bd_addr_t addr) const ;
149+
142150 /* * Get the total size of the underlying device
143151 *
144152 * @return Size of the underlying device in bytes
You can’t perform that action at this time.
0 commit comments