|
|
|
@ -125,6 +125,11 @@ size_t flash_write(struct flash_dev *dev, uint32_t addr, const void *data, |
|
|
|
|
#define flash_write __wrap_flash_write |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifdef flash_write0 |
|
|
|
|
#undef flash_write0 |
|
|
|
|
#define flash_write0 __real_flash_write0 |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
size_t flash_write0(struct flash_dev *dev, uint32_t addr, size_t len) |
|
|
|
|
{ |
|
|
|
|
uint8_t data[32]; |
|
|
|
@ -146,6 +151,16 @@ size_t flash_write0(struct flash_dev *dev, uint32_t addr, size_t len) |
|
|
|
|
return ret; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifdef flash_write0 |
|
|
|
|
#undef flash_write0 |
|
|
|
|
#define flash_write0 __wrap_flash_write0 |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifdef flash_copy |
|
|
|
|
#undef flash_copy |
|
|
|
|
#define flash_copy __real_flash_copy |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
size_t flash_copy(struct flash_dev *dev, uint32_t dst, uint32_t src, size_t len) |
|
|
|
|
{ |
|
|
|
|
if (!dev) |
|
|
|
@ -154,6 +169,11 @@ size_t flash_copy(struct flash_dev *dev, uint32_t dst, uint32_t src, size_t len) |
|
|
|
|
return dev->ops->copy(dev, dst, src, len); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifdef flash_copy |
|
|
|
|
#undef flash_copy |
|
|
|
|
#define flash_copy __wrap_flash_copy |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifdef flash_is_erased |
|
|
|
|
#undef flash_is_erased |
|
|
|
|
#define flash_is_erased __real_flash_is_erased |
|
|
|
|