summaryrefslogtreecommitdiff
path: root/controller/fw/src/spi_flash.c
diff options
context:
space:
mode:
authorjaseg <git-bigdata-wsl-arch@jaseg.de>2020-03-21 14:19:01 +0100
committerjaseg <git-bigdata-wsl-arch@jaseg.de>2020-03-21 14:19:01 +0100
commit3beecbc4fa60773ffbdf04ce1908a86be5908551 (patch)
tree3a470e3e86662804a090141d8843c46ce8620191 /controller/fw/src/spi_flash.c
parent37338e2ad8ca226119121432b65f6c61134e60ac (diff)
downloadmaster-thesis-3beecbc4fa60773ffbdf04ce1908a86be5908551.tar.gz
master-thesis-3beecbc4fa60773ffbdf04ce1908a86be5908551.tar.bz2
master-thesis-3beecbc4fa60773ffbdf04ce1908a86be5908551.zip
Basic JTAG working
Diffstat (limited to 'controller/fw/src/spi_flash.c')
-rw-r--r--controller/fw/src/spi_flash.c3
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) {