pub struct SawtoothConfig {
pub increment_trigger: Trigger,
pub reset_trigger: Trigger,
pub initial: u16,
pub increment: u16,
pub direction: SawtoothDirection,
}
Expand description
Sawtooth Generation configuration for the generate_sawtooth() method
Fields§
§increment_trigger: Trigger
Specify the increment trigger source from the Trigger enum when increment is triggered, the DAC will increment incremenbt or decrement (depending on the configured direction) the output by the increment value specified in the config.
reset_trigger: Trigger
Specify the reset trigger source from the Trigger enum when reset is triggered, the DAC will reset to the initial value specified in the config.
initial: u16
Initial value that is set on the DAC output each time a reset event is triggered.
increment: u16
Increment value that is added/subtracted from the DAC output each time an increment event is triggered.
direction: SawtoothDirection
The direction of the sawtooth wave to control if the wave is incremented or decremented on each increment trigger event.
Trait Implementations§
Source§impl Clone for SawtoothConfig
impl Clone for SawtoothConfig
Source§fn clone(&self) -> SawtoothConfig
fn clone(&self) -> SawtoothConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl Copy for SawtoothConfig
Auto Trait Implementations§
impl Freeze for SawtoothConfig
impl RefUnwindSafe for SawtoothConfig
impl Send for SawtoothConfig
impl Sync for SawtoothConfig
impl Unpin for SawtoothConfig
impl UnwindSafe for SawtoothConfig
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