diff options
| author | melvdl <[email protected]> | 2025-06-27 01:47:05 +0200 |
|---|---|---|
| committer | melvdl <[email protected]> | 2025-06-27 01:47:05 +0200 |
| commit | b4269f0f592955d12defade8a9f1769479bcf60f (patch) | |
| tree | efbfce7da04a954daba3ed688069c53a022cbe35 | |
| parent | 06b160ac83b70b292ea92446a1eb69096b1c86ea (diff) | |
[stm32h723]: fix spdifrx example
| -rw-r--r-- | examples/stm32h723/src/bin/spdifrx.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/stm32h723/src/bin/spdifrx.rs b/examples/stm32h723/src/bin/spdifrx.rs index a04d7cb34..61e77249d 100644 --- a/examples/stm32h723/src/bin/spdifrx.rs +++ b/examples/stm32h723/src/bin/spdifrx.rs | |||
| @@ -7,9 +7,9 @@ | |||
| 7 | 7 | ||
| 8 | use defmt::{info, trace}; | 8 | use defmt::{info, trace}; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_futures::select::{self, select, Either}; | 10 | use embassy_futures::select::{select, Either}; |
| 11 | use embassy_stm32::spdifrx::{self, Spdifrx}; | 11 | use embassy_stm32::spdifrx::{self, Spdifrx}; |
| 12 | use embassy_stm32::{bind_interrupts, peripherals, sai}; | 12 | use embassy_stm32::{bind_interrupts, peripherals, sai, Peri}; |
| 13 | use grounded::uninit::GroundedArrayCell; | 13 | use grounded::uninit::GroundedArrayCell; |
| 14 | use hal::sai::*; | 14 | use hal::sai::*; |
| 15 | use {defmt_rtt as _, embassy_stm32 as hal, panic_probe as _}; | 15 | use {defmt_rtt as _, embassy_stm32 as hal, panic_probe as _}; |
| @@ -144,9 +144,9 @@ async fn main(_spawner: Spawner) { | |||
| 144 | /// | 144 | /// |
| 145 | /// Used (again) after dropping the SPDIFRX instance, in case of errors (e.g. source disconnect). | 145 | /// Used (again) after dropping the SPDIFRX instance, in case of errors (e.g. source disconnect). |
| 146 | fn new_spdif_receiver<'d>( | 146 | fn new_spdif_receiver<'d>( |
| 147 | spdifrx: &'d mut peripherals::SPDIFRX1, | 147 | spdifrx: Peri<'d, peripherals::SPDIFRX1>, |
| 148 | input_pin: &'d mut peripherals::PD7, | 148 | input_pin: Peri<'d, peripherals::PD7>, |
| 149 | dma: &'d mut peripherals::DMA2_CH7, | 149 | dma: Peri<'d, peripherals::DMA2_CH7>, |
| 150 | buf: &'d mut [u32], | 150 | buf: &'d mut [u32], |
| 151 | ) -> Spdifrx<'d, peripherals::SPDIFRX1> { | 151 | ) -> Spdifrx<'d, peripherals::SPDIFRX1> { |
| 152 | Spdifrx::new(spdifrx, Irqs, spdifrx::Config::default(), input_pin, dma, buf) | 152 | Spdifrx::new(spdifrx, Irqs, spdifrx::Config::default(), input_pin, dma, buf) |
| @@ -156,11 +156,11 @@ fn new_spdif_receiver<'d>( | |||
| 156 | /// | 156 | /// |
| 157 | /// Used (again) after dropping the SAI4 instance, in case of errors (e.g. buffer overrun). | 157 | /// Used (again) after dropping the SAI4 instance, in case of errors (e.g. buffer overrun). |
| 158 | fn new_sai_transmitter<'d>( | 158 | fn new_sai_transmitter<'d>( |
| 159 | sai: &'d mut peripherals::SAI4, | 159 | sai: Peri<'d, peripherals::SAI4>, |
| 160 | sck: &'d mut peripherals::PD13, | 160 | sck: Peri<'d, peripherals::PD13>, |
| 161 | sd: &'d mut peripherals::PC1, | 161 | sd: Peri<'d, peripherals::PC1>, |
| 162 | fs: &'d mut peripherals::PD12, | 162 | fs: Peri<'d, peripherals::PD12>, |
| 163 | dma: &'d mut peripherals::BDMA_CH0, | 163 | dma: Peri<'d, peripherals::BDMA_CH0>, |
| 164 | buf: &'d mut [u32], | 164 | buf: &'d mut [u32], |
| 165 | ) -> Sai<'d, peripherals::SAI4, u32> { | 165 | ) -> Sai<'d, peripherals::SAI4, u32> { |
| 166 | let mut sai_config = hal::sai::Config::default(); | 166 | let mut sai_config = hal::sai::Config::default(); |
