Struct dac8564::Dac [−][src]
DAC8564
Implementations
impl<NSS, LDAC, ENABLE> Dac<NSS, LDAC, ENABLE> where
NSS: OutputPin,
LDAC: OutputPin,
ENABLE: OutputPin,
[src]
NSS: OutputPin,
LDAC: OutputPin,
ENABLE: OutputPin,
pub fn new(nss: NSS, ldac: LDAC, enable: ENABLE) -> Self
[src]
Initialize a new instance of DAC8564
pub fn enable(&mut self)
[src]
Enables the DAC by toggling the Enable, NSS and LDAC lines
pub fn write_blocking(
&mut self,
spi: &mut dyn Write<u8, Error = ()>,
channel: Channel,
value: u16
) -> Result<(), DacError>
[src]
&mut self,
spi: &mut dyn Write<u8, Error = ()>,
channel: Channel,
value: u16
) -> Result<(), DacError>
Write to the DAC via a blocking call on the specified SPI interface
pub fn prepare_transfer<F: FnMut([u8; 3])>(
&mut self,
channel: Channel,
value: u16,
callback: F
)
[src]
&mut self,
channel: Channel,
value: u16,
callback: F
)
For asynchronous communication methods (e.g. Interrupt or DMA), this function prepares the DAC for the transfer, generates the command and passes it back to the initiator via the callback parameter
Auto Trait Implementations
impl<NSS, LDAC, ENABLE> Send for Dac<NSS, LDAC, ENABLE> where
ENABLE: Send,
LDAC: Send,
NSS: Send,
ENABLE: Send,
LDAC: Send,
NSS: Send,
impl<NSS, LDAC, ENABLE> Sync for Dac<NSS, LDAC, ENABLE> where
ENABLE: Sync,
LDAC: Sync,
NSS: Sync,
ENABLE: Sync,
LDAC: Sync,
NSS: Sync,
impl<NSS, LDAC, ENABLE> Unpin for Dac<NSS, LDAC, ENABLE> where
ENABLE: Unpin,
LDAC: Unpin,
NSS: Unpin,
ENABLE: Unpin,
LDAC: Unpin,
NSS: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,