diff options
Diffstat (limited to 'controller/fw/src/spi_flash.c')
-rw-r--r-- | controller/fw/src/spi_flash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/controller/fw/src/spi_flash.c b/controller/fw/src/spi_flash.c index 305be8f..639c2b6 100644 --- a/controller/fw/src/spi_flash.c +++ b/controller/fw/src/spi_flash.c @@ -96,7 +96,7 @@ void spif_init(struct spi_flash_if *spif, size_t page_size, SPI_TypeDef *spi, vo spif->cs(1); } -void spif_read(struct spi_flash_if *spif, size_t addr, size_t len, char* data) { +ssize_t spif_read(struct spi_flash_if *spif, size_t addr, size_t len, char* data) { spif_enable_write(spif); spif->cs(0); @@ -109,6 +109,7 @@ void spif_read(struct spi_flash_if *spif, size_t addr, size_t len, char* data) { data[i] = spi_read(spif); spif->cs(1); + return len; } void spif_write(struct spi_flash_if *spif, size_t addr, size_t len, const char* data) { |