mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #7953 from davidsaada/david_is_valid_erase_fix
Fix is_valid_erase function to use get_erase_size with addresspull/8274/head
commit
6b85ec7c57
|
@ -226,8 +226,8 @@ public:
|
|||
bool is_valid_erase(bd_addr_t addr, bd_size_t size) const
|
||||
{
|
||||
return (
|
||||
addr % get_erase_size() == 0 &&
|
||||
size % get_erase_size() == 0 &&
|
||||
addr % get_erase_size(addr) == 0 &&
|
||||
(addr + size) % get_erase_size(addr + size - 1) == 0 &&
|
||||
addr + size <= this->size());
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue