Skip to content

Commit b4b25e1

Browse files
Wren6991kilograham
authored andcommitted
Fix copyright date, add comment clarifying FIFO behaviour
1 parent dbe9a66 commit b4b25e1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pio/clocked_input/clocked_input.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
2+
* Copyright (c) 2021 Raspberry Pi (Trading) Ltd.
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
@@ -61,7 +61,11 @@ int main() {
6161
// return until the full transmission is finished.
6262
spi_write_blocking(spi0, (const uint8_t*)txbuf, BUF_SIZE);
6363

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.
6569
puts("Reading back from RX FIFO:");
6670
for (int i = 0; i < BUF_SIZE; ++i) {
6771
uint8_t rxdata = pio_sm_get_blocking(pio, sm);

0 commit comments

Comments
 (0)