File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
/**
2
- * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
2
+ * Copyright (c) 2021 Raspberry Pi (Trading) Ltd.
3
3
*
4
4
* SPDX-License-Identifier: BSD-3-Clause
5
5
*/
@@ -61,7 +61,11 @@ int main() {
61
61
// return until the full transmission is finished.
62
62
spi_write_blocking (spi0 , (const uint8_t * )txbuf , BUF_SIZE );
63
63
64
- // The data we just sent should now be present in the state machine's FIFO.
64
+ // The data we just sent should now be present in the state machine's
65
+ // FIFO. We only sent 8 bytes, so all the data received by the state
66
+ // machine will fit into the FIFO. Generally you want to be continuously
67
+ // reading data out as it appears in the FIFO -- either with polling, FIFO
68
+ // interrupts, or DMA.
65
69
puts ("Reading back from RX FIFO:" );
66
70
for (int i = 0 ; i < BUF_SIZE ; ++ i ) {
67
71
uint8_t rxdata = pio_sm_get_blocking (pio , sm );
You can’t perform that action at this time.
0 commit comments