[−][src]Struct mcp4725::Command
A Command to send to the MCP4725. Using the address(), command_type(), power_mode() and data() builder methods the parameters for this command can be set. Commands can be sent using the send method on the MCP4725 driver. A command can (and should) be re-used. data() can be used to re-set the data while keeping other parameters the same.
Implementations
impl Command
[src]
pub fn bytes(&self) -> [u8; 3]
[src]
Format data bytes to send to the DAC. At the moment only sending one sample at a time is supported.
pub fn data(self, data: u16) -> Self
[src]
Set the data to send with this command. This data will be truncated to a 12 bit int
pub fn command_type(self, command: CommandType) -> Self
[src]
Write the supplied values to the EEPROM as well as to the DAC
pub fn power_mode(self, mode: PowerDown) -> Self
[src]
Set the power mode
Trait Implementations
impl Debug for Command
[src]
impl Default for Command
[src]
impl Eq for Command
[src]
impl PartialEq<Command> for Command
[src]
impl StructuralEq for Command
[src]
impl StructuralPartialEq for Command
[src]
Auto Trait Implementations
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,
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.
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>,