Updates along with SDK1.3.0 release (#181)
Bug fixes and new examples Co-authored-by: Paulo Marques <pm@quant-insight.com> Co-authored-by: martin <admin@crossleys.biz> Co-authored-by: matiasilva <matias.silva@raspberrypi.com> Co-authored-by: Uri Shaked <uri@urishaked.com> Co-authored-by: Diego Solano <diegosolano@gmail.com> Co-authored-by: Andrew Scheller <andrew.scheller@raspberrypi.com> Co-authored-by: Adrian Hesketh <a-h@users.noreply.github.com> Co-authored-by: Emircan Gündoğdu <58917386+emircangun@users.noreply.github.com> Co-authored-by: Josef Wegner <80200012+josefwegner@users.noreply.github.com> Co-authored-by: pmarques-dev <72901351+pmarques-dev@users.noreply.github.com> Co-authored-by: Paulo Marques <pm@quant-insight.com> Co-authored-by: mjcross <mjcross@users.noreply.github.com> Co-authored-by: martin <admin@crossleys.biz>
This commit is contained in:
@@ -56,7 +56,7 @@ int main() {
|
||||
printf("Configure TX DMA\n");
|
||||
dma_channel_config c = dma_channel_get_default_config(dma_tx);
|
||||
channel_config_set_transfer_data_size(&c, DMA_SIZE_8);
|
||||
channel_config_set_dreq(&c, spi_get_index(spi_default) ? DREQ_SPI1_TX : DREQ_SPI0_TX);
|
||||
channel_config_set_dreq(&c, spi_get_dreq(spi_default, true));
|
||||
dma_channel_configure(dma_tx, &c,
|
||||
&spi_get_hw(spi_default)->dr, // write address
|
||||
txbuf, // read address
|
||||
@@ -70,7 +70,7 @@ int main() {
|
||||
// address to increment (so data is written throughout the buffer)
|
||||
c = dma_channel_get_default_config(dma_rx);
|
||||
channel_config_set_transfer_data_size(&c, DMA_SIZE_8);
|
||||
channel_config_set_dreq(&c, spi_get_index(spi_default) ? DREQ_SPI1_RX : DREQ_SPI0_RX);
|
||||
channel_config_set_dreq(&c, spi_get_dreq(spi_default, false));
|
||||
channel_config_set_read_increment(&c, false);
|
||||
channel_config_set_write_increment(&c, true);
|
||||
dma_channel_configure(dma_rx, &c,
|
||||
|
||||
Reference in New Issue
Block a user