Skip to content

Commit 70afb80

Browse files
committed
Try to read and send the requested data in chunks
1 parent 33845c2 commit 70afb80

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ static void command_loop(void)
235235
for(uint32_t i = 0; i < rlen; i += chunk) {
236236
chunk = MIN(rlen - i, sizeof(buf));
237237
spi_read_blocking(SPI_IF, 0, buf, chunk);
238+
// Send ACK followed by received data
239+
sendbyte_blocking(S_ACK);
238240
sendbytes_blocking(rx_buffer, rlen);
239241
}
240242
cs_deselect(SPI_CS);

0 commit comments

Comments
 (0)