pub struct Cordic32<'d, 'a, T: Instance> { /* private fields */ }Expand description
q1.31 related
Implementations§
Source§impl<'d, 'a, T: Instance> Cordic32<'d, 'a, T>
impl<'d, 'a, T: Instance> Cordic32<'d, 'a, T>
Sourcepub fn set_access_counts(
&mut self,
arg_count: AccessCount,
res_count: AccessCount,
)
pub fn set_access_counts( &mut self, arg_count: AccessCount, res_count: AccessCount, )
Change arg_count and res_count without resetting ARG2.
This is a lightweight CSR update for switching between 1-arg and 2-arg modes within the same function configuration (e.g. after an initial 2-arg call sets ARG2, switch to 1-arg mode for the hot loop).
Sourcepub fn blocking_calc(
&mut self,
arg: &[Q32<31>],
res: &mut [Q32<31>],
) -> Result<usize, CordicError>
pub fn blocking_calc( &mut self, arg: &[Q32<31>], res: &mut [Q32<31>], ) -> Result<usize, CordicError>
Run a blocking CORDIC calculation in q1.31 format.
Uses arg_count and res_count from the current Config.
If arg_count is One, ARG2 must have been set to the desired value
beforehand (e.g. via a prior Two-arg call or [Self::reconfigure]).
Sourcepub async fn async_calc<'b, W, R>(
&mut self,
write_dma: Peri<'b, W>,
read_dma: Peri<'b, R>,
irq: impl Binding<W::Interrupt, InterruptHandler<W>> + Binding<R::Interrupt, InterruptHandler<R>> + 'b,
arg: &[Q32<31>],
res: &mut [Q32<31>],
) -> Result<usize, CordicError>
pub async fn async_calc<'b, W, R>( &mut self, write_dma: Peri<'b, W>, read_dma: Peri<'b, R>, irq: impl Binding<W::Interrupt, InterruptHandler<W>> + Binding<R::Interrupt, InterruptHandler<R>> + 'b, arg: &[Q32<31>], res: &mut [Q32<31>], ) -> Result<usize, CordicError>
Run an async CORDIC calculation in q1.31 format.
Uses arg_count and res_count from the current Config.
If arg_count is One, ARG2 must have been set to the desired value
beforehand (e.g. via a prior Two-arg call or [Self::reconfigure]).
Auto Trait Implementations§
impl<'d, 'a, T> Freeze for Cordic32<'d, 'a, T>
impl<'d, 'a, T> RefUnwindSafe for Cordic32<'d, 'a, T>where
T: RefUnwindSafe,
impl<'d, 'a, T> Send for Cordic32<'d, 'a, T>where
T: Send,
impl<'d, 'a, T> Sync for Cordic32<'d, 'a, T>where
T: Sync,
impl<'d, 'a, T> Unpin for Cordic32<'d, 'a, T>
impl<'d, 'a, T> !UnwindSafe for Cordic32<'d, 'a, T>
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