pub struct Mdf<'d, T: Instance, F: Filter> { /* private fields */ }Expand description
Ring-buffered MDF driver for one digital filter.
Implementations§
Source§impl<'d, T: Instance, F: Filter> Mdf<'d, T, F>
impl<'d, T: Instance, F: Filter> Mdf<'d, T, F>
Sourcepub fn new<D>(
peri: Peri<'d, T>,
irq: impl Binding<F::Interrupt, FilterInterruptHandler<T, F>> + Binding<D::Interrupt, InterruptHandler<D>> + 'd,
config: Config,
cck: Peri<'d, impl CckPin<T>>,
sdi: Peri<'d, impl SdiPin<T>>,
dma: Peri<'d, D>,
dma_buf: &'d mut [u32],
) -> Selfwhere
D: RxDma<T, F>,
F: FilterInterrupt,
pub fn new<D>(
peri: Peri<'d, T>,
irq: impl Binding<F::Interrupt, FilterInterruptHandler<T, F>> + Binding<D::Interrupt, InterruptHandler<D>> + 'd,
config: Config,
cck: Peri<'d, impl CckPin<T>>,
sdi: Peri<'d, impl SdiPin<T>>,
dma: Peri<'d, D>,
dma_buf: &'d mut [u32],
) -> Selfwhere
D: RxDma<T, F>,
F: FilterInterrupt,
Create a new MDF instance for filter F.
cck drives the PDM bit clock and sdi receives the PDM data stream for the
serial interface with the same index as the filter.
Sourcepub async fn read_raw(&mut self, words: &mut [u32]) -> Result<(), Error>
pub async fn read_raw(&mut self, words: &mut [u32]) -> Result<(), Error>
Read raw 32-bit DMA words from the filter output ring buffer.
Sourcepub fn kernel_clock_hz(&self) -> u32
pub fn kernel_clock_hz(&self) -> u32
Return the kernel clock frequency in Hz.
Trait Implementations§
Auto Trait Implementations§
impl<'d, T, F> Freeze for Mdf<'d, T, F>where
T: Freeze,
impl<'d, T, F> RefUnwindSafe for Mdf<'d, T, F>where
T: RefUnwindSafe,
F: RefUnwindSafe,
impl<'d, T, F> Send for Mdf<'d, T, F>
impl<'d, T, F> Sync for Mdf<'d, T, F>
impl<'d, T, F> Unpin for Mdf<'d, T, F>
impl<'d, T, F> !UnwindSafe for Mdf<'d, T, F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more