| 240 | } |
| 241 | |
| 242 | static rt_ssize_t mtd_nor_dev_write(struct rt_mtd_nor_device* device, rt_off_t offset, const rt_uint8_t* data, rt_size_t length) |
| 243 | { |
| 244 | int ret = 0; |
| 245 | struct fal_mtd_nor_device *part; |
| 246 | |
| 247 | part = (struct fal_mtd_nor_device*) device; |
| 248 | RT_ASSERT(part != RT_NULL); |
| 249 | |
| 250 | ret = fal_partition_write(part->fal_part, offset, data, length); |
| 251 | |
| 252 | if (ret != (int) length) |
| 253 | { |
| 254 | ret = 0; |
| 255 | } |
| 256 | else |
| 257 | { |
| 258 | ret = length; |
| 259 | } |
| 260 | |
| 261 | return ret; |
| 262 | } |
| 263 | |
| 264 | static rt_err_t mtd_nor_dev_erase(struct rt_mtd_nor_device* device, rt_off_t offset, rt_size_t length) |
| 265 | { |
nothing calls this directly
no test coverage detected