embassy-stm32

Crates

git

Versions

stm32h7s3z8

Flavors

Cordic

Struct Cordic 

Source
pub struct Cordic<'d, T: Instance> { /* private fields */ }
Expand description

CORDIC driver

Implementations§

Source§

impl<'d, T: Instance> Cordic<'d, T>

Source

pub fn new(peri: Peri<'d, T>, config: &Config) -> Self

Create a Cordic driver instance

Source

pub fn q1_31<'a>( &'a mut self, arg_count: AccessCount, res_count: AccessCount, ) -> Cordic32<'d, 'a, T>

q1.31 related Set the argument access count.

AccessCount::One: each WDATA write provides one argument (ARG1), reusing the previous ARG2. AccessCount::Two: arguments are written in pairs (ARG1 then ARG2) to WDATA. Set the result access count.

AccessCount::One: each calculation produces one RDATA read (primary result only). AccessCount::Two: each calculation produces two RDATA reads (primary + secondary).

Source

pub fn q1_16<'a>(&'a mut self) -> Cordic16<'d, 'a, T>

q1.16 related

Trait Implementations§

Source§

impl<'d, T: Instance> Drop for Cordic<'d, T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'d, T: Instance> SetConfig for Cordic<'d, T>

Source§

fn set_config(&mut self, config: &Self::Config) -> Result<(), Self::ConfigError>

Set a new config for Cordic driver.

This calls [Self::reconfigure], which resets ARG2 to +1. To change only arg_count/res_count without resetting ARG2, use [Self::set_access_counts] instead.

Source§

type Config = Config

The configuration type used by this driver.
Source§

type ConfigError = Infallible

The error type that can occur if set_config fails.

Auto Trait Implementations§

§

impl<'d, T> Freeze for Cordic<'d, T>
where T: Freeze,

§

impl<'d, T> RefUnwindSafe for Cordic<'d, T>
where T: RefUnwindSafe,

§

impl<'d, T> Send for Cordic<'d, T>
where T: Send,

§

impl<'d, T> Sync for Cordic<'d, T>
where T: Sync,

§

impl<'d, T> Unpin for Cordic<'d, T>
where T: Unpin,

§

impl<'d, T> !UnwindSafe for Cordic<'d, T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.