From b4b25e1f0d47010ff2624d3d0c512f0ec2a01ed2 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Mon, 8 Feb 2021 13:41:02 +0000 Subject: [PATCH] Fix copyright date, add comment clarifying FIFO behaviour --- pio/clocked_input/clocked_input.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pio/clocked_input/clocked_input.c b/pio/clocked_input/clocked_input.c index 5175b36..acb7497 100644 --- a/pio/clocked_input/clocked_input.c +++ b/pio/clocked_input/clocked_input.c @@ -1,5 +1,5 @@ /** - * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -61,7 +61,11 @@ int main() { // return until the full transmission is finished. spi_write_blocking(spi0, (const uint8_t*)txbuf, BUF_SIZE); - // The data we just sent should now be present in the state machine's FIFO. + // The data we just sent should now be present in the state machine's + // FIFO. We only sent 8 bytes, so all the data received by the state + // machine will fit into the FIFO. Generally you want to be continuously + // reading data out as it appears in the FIFO -- either with polling, FIFO + // interrupts, or DMA. puts("Reading back from RX FIFO:"); for (int i = 0; i < BUF_SIZE; ++i) { uint8_t rxdata = pio_sm_get_blocking(pio, sm);