#include #include #include int flash_read(struct flash_dev *dev, uint32_t addr, void *data, size_t len) { if (!dev) return -1; return dev->ops->read(dev, addr, data, len); } int flash_write(struct flash_dev *dev, uint32_t addr, const void *data, size_t len) { if (!dev) return -1; return dev->ops->write(dev, addr, data, len); } int flash_erase(struct flash_dev *dev, uint32_t addr, size_t len) { if (!dev) return -1; return dev->ops->erase(dev, addr, len); }