spi_flash.h 484 B

123456789101112131415161718
  1. /*
  2. * Copyright (c) 2019-2020, Broadcom
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef SPI_FLASH_H
  7. #define SPI_FLASH_H
  8. #include <sf.h>
  9. int spi_flash_probe(struct spi_flash *flash);
  10. int spi_flash_erase(struct spi_flash *flash, uint32_t offset, uint32_t len);
  11. int spi_flash_write(struct spi_flash *flash, uint32_t offset,
  12. uint32_t len, void *buf);
  13. int spi_flash_read(struct spi_flash *flash, uint32_t offset,
  14. uint32_t len, void *data);
  15. #endif /* _SPI_FLASH_H_ */