[−][src]Struct mynewt::I2C
Rust Embedded HAL interface for Mynewt I2C
Implementations
impl I2C
[src]
Rust Embedded HAL interface for Mynewt I2C
pub fn new() -> Self
[src]
Create a new I2C port
pub fn init(
&mut self,
i2c_num: u8,
i2c_settings: *const hal_i2c_settings,
operation_timeout_in_ticks: u32
) -> MynewtResult<()>
[src]
&mut self,
i2c_num: u8,
i2c_settings: *const hal_i2c_settings,
operation_timeout_in_ticks: u32
) -> MynewtResult<()>
Initiaise the I2C port
Trait Implementations
impl Read for I2C
[src]
fn read(&mut self, addr: u8, data: &mut [u8]) -> Result<(), Self::Error>
[src]
type Error = MynewtError
Error type
impl Write for I2C
[src]
fn write(&mut self, addr: u8, data: &[u8]) -> Result<(), Self::Error>
[src]
type Error = MynewtError
Error type
impl WriteRead for I2C
[src]
fn write_read(
&mut self,
addr: u8,
data_write: &[u8],
data_read: &mut [u8]
) -> Result<(), Self::Error>
[src]
&mut self,
addr: u8,
data_write: &[u8],
data_read: &mut [u8]
) -> Result<(), Self::Error>
type Error = MynewtError
Error type
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> Same<T> for T
type Output = T
Should always be Self
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>,