Skip to content

Commit 1b19477

Browse files
committed
Try to read and send the requested data in chunks
1 parent 6ca66ee commit 1b19477

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static void command_loop(void)
234234
cs_select(SPI_CS);
235235
for(uint32_t i = 0; i < rlen; i += chunk) {
236236
chunk = MIN(rlen - i, sizeof(buf));
237-
spi_read_blocking(SPI_IF, buf, chunk);
237+
spi_read_blocking(SPI_IF, 0, buf, chunk);
238238
fwrite(buf, 1, chunk, stdout);
239239
fflush(stdout);
240240
}

0 commit comments

Comments
 (0)