Struct stabilizer::hardware::dac::Dac0Output
source · pub struct Dac0Output { /* private fields */ }
Expand description
Represents data associated with DAC.
Implementations§
source§impl Dac0Output
impl Dac0Output
sourcepub fn new(
spi: Spi<SPI4, Enabled, u16>,
stream: Stream6<DMA1>,
trigger_channel: Channel3,
batch_size: usize
) -> Self
pub fn new( spi: Spi<SPI4, Enabled, u16>, stream: Stream6<DMA1>, trigger_channel: Channel3, batch_size: usize ) -> Self
Construct the DAC output channel.
§Args
spi
- The SPI interface used to communicate with the ADC.stream
- The DMA stream used to write DAC codes over SPI.trigger_channel
- The sampling timer output compare channel for update triggers.
pub fn start(&mut self)
sourcepub fn with_buffer<F, R>(&mut self, f: F) -> Result<R, DMAError>
pub fn with_buffer<F, R>(&mut self, f: F) -> Result<R, DMAError>
Wait for the transfer of the currently active buffer to complete, then call a function on the now inactive buffer and acknowledge the transfer complete flag.
NOTE(unsafe): Memory safety and access ordering is not guaranteed (see the HAL DMA docs).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dac0Output
impl RefUnwindSafe for Dac0Output
impl Send for Dac0Output
impl !Sync for Dac0Output
impl Unpin for Dac0Output
impl !UnwindSafe for Dac0Output
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