Struct stabilizer::hardware::dac::Dac1Output
source · pub struct Dac1Output { /* private fields */ }
Expand description
Represents data associated with DAC.
Implementations§
source§impl Dac1Output
impl Dac1Output
sourcepub fn new(
spi: Spi<SPI5, Enabled, u16>,
stream: Stream7<DMA1>,
trigger_channel: Channel4,
batch_size: usize
) -> Self
pub fn new( spi: Spi<SPI5, Enabled, u16>, stream: Stream7<DMA1>, trigger_channel: Channel4, 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 Dac1Output
impl RefUnwindSafe for Dac1Output
impl Send for Dac1Output
impl !Sync for Dac1Output
impl Unpin for Dac1Output
impl !UnwindSafe for Dac1Output
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