pub struct Config { /* private fields */ }Expand description
CORDIC configuration
Implementations§
Source§impl Config
impl Config
Sourcepub fn new(
function: Function,
precision: Precision,
scale: Scale,
) -> Result<Self, CordicError>
pub fn new( function: Function, precision: Precision, scale: Scale, ) -> Result<Self, CordicError>
Create a config for Cordic driver
arg_count defaults to AccessCount::One and res_count defaults to AccessCount::Two.
Use the builder methods Self::arg_count and Self::res_count to override.
Sourcepub fn arg_count(self, arg_count: AccessCount) -> Self
pub fn arg_count(self, arg_count: AccessCount) -> Self
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.
Sourcepub fn res_count(self, res_count: AccessCount) -> Self
pub fn res_count(self, res_count: AccessCount) -> Self
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).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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