| 219 | }; |
| 220 | |
| 221 | static rt_ssize_t mtd_nor_dev_read(struct rt_mtd_nor_device* device, rt_off_t offset, rt_uint8_t* data, rt_size_t length) |
| 222 | { |
| 223 | int ret = 0; |
| 224 | struct fal_mtd_nor_device *part = (struct fal_mtd_nor_device*) device; |
| 225 | |
| 226 | RT_ASSERT(part != RT_NULL); |
| 227 | |
| 228 | ret = fal_partition_read(part->fal_part, offset, data, length); |
| 229 | |
| 230 | if (ret != (int)length) |
| 231 | { |
| 232 | ret = 0; |
| 233 | } |
| 234 | else |
| 235 | { |
| 236 | ret = length; |
| 237 | } |
| 238 | |
| 239 | return ret; |
| 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 | { |
nothing calls this directly
no test coverage detected