Struct ftd2xx_embedded_hal::I2c [−][src]
FTDI I2C interface.
This is created by calling Ft232hHal::i2c
.
Implementations
impl<'a> I2c<'a>
[src]
pub fn set_stop_start_len(&mut self, start_stop_cmds: u8)
[src]
Set the length of start and stop conditions.
This is an advanced feature that most people will not need to touch. I2C start and stop conditions are generated with a number of MPSSE commands. This sets the number of MPSSE command generated for each stop and start condition. An increase in the number of MPSSE commands roughtly correlates to an increase in the duration.
Example
use ftd2xx_embedded_hal as hal; let ftdi = hal::Ft232hHal::new()?.init_default()?; let mut i2c = ftdi.i2c()?; i2c.set_stop_start_len(10);
Trait Implementations
impl<'a> Debug for I2c<'a>
[src]
impl<'a> Read for I2c<'a>
[src]
type Error = TimeoutError
Error type
fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error>
[src]
impl<'a> Write for I2c<'a>
[src]
type Error = TimeoutError
Error type
fn write(&mut self, addr: u8, bytes: &[u8]) -> Result<(), Self::Error>
[src]
impl<'a> WriteRead for I2c<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for I2c<'a>
impl<'a> !Send for I2c<'a>
impl<'a> !Sync for I2c<'a>
impl<'a> Unpin for I2c<'a>
impl<'a> UnwindSafe for I2c<'a>
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>,