diff --git a/embassy-stm32/src/rcc/f4.rs b/embassy-stm32/src/rcc/f4.rs index 17834784a..2f851cfa1 100644 --- a/embassy-stm32/src/rcc/f4.rs +++ b/embassy-stm32/src/rcc/f4.rs @@ -97,7 +97,7 @@ fn setup_i2s_pll(vco_in: u32, plli2s: Option) -> Option { } #[cfg(not(any(stm32f427, stm32f429, stm32f437, stm32f439, stm32f446, stm32f469, stm32f479)))] -fn setup_sai_pll(vco_in: u32, _pllsai: Option) -> Option { +fn setup_sai_pll(_vco_in: u32, _pllsai: Option) -> Option { None } diff --git a/embassy-stm32/src/sai/mod.rs b/embassy-stm32/src/sai/mod.rs index aa996a99a..d2949e9a0 100644 --- a/embassy-stm32/src/sai/mod.rs +++ b/embassy-stm32/src/sai/mod.rs @@ -3,7 +3,7 @@ use embassy_embedded_hal::SetConfig; use embassy_hal_internal::{into_ref, PeripheralRef}; -use crate::dma::{Channel, ReadableRingBuffer, TransferOptions, WritableRingBuffer}; +use crate::dma::{ringbuffer, Channel, ReadableRingBuffer, TransferOptions, WritableRingBuffer}; use crate::gpio::sealed::{AFType, Pin as _}; use crate::gpio::AnyPin; use crate::pac::sai::{vals, Sai as Regs}; @@ -17,6 +17,13 @@ pub use crate::dma::word; pub enum Error { NotATransmitter, NotAReceiver, + OverrunError, +} + +impl From for Error { + fn from(_: ringbuffer::OverrunError) -> Self { + Self::OverrunError + } } #[derive(Copy, Clone)] @@ -499,6 +506,7 @@ pub enum SubBlock { enum RingBuffer<'d, C: Channel, W: word::Word> { Writable(WritableRingBuffer<'d, C, W>), + #[allow(dead_code)] // remove this after implementing new_* functions for receiver Readable(ReadableRingBuffer<'d, C, W>), }