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
446
446
return _block_size;
447
447
}
448
448
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
+
449
456
bd_size_t DataFlashBlockDevice::size () const
450
457
{
451
458
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 {
139
139
*/
140
140
virtual bd_size_t get_erase_size () const ;
141
141
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
+
142
150
/* * Get the total size of the underlying device
143
151
*
144
152
* @return Size of the underlying device in bytes
You can’t perform that action at this time.
0 commit comments