spi_flash_read

The interface has the following parameters.
  • Synopsis:
    static inline int spi_flash_read(struct spi_flash *flash, u32 offset, size_t len, void *buf)
  • Description: The interface is used to read data from the SPI flash.
  • Parameter:
    • flash: The SPI flash device.
    • offset: The address offset of the above device in bytes.
    • len: The length of bytes to read.
    • buf: The buffer to store the read data.
  • Return:
    • Success: 0.
    • Failure: Any value other than 0.