Struct i2cdev::linux::LinuxI2CBus

source ·
pub struct LinuxI2CBus { /* private fields */ }
Expand description

Linux I2C bus

Implementations§

source§

impl LinuxI2CBus

source

pub fn new<P: AsRef<Path>>(path: P) -> Result<LinuxI2CBus, LinuxI2CError>

Create a new LinuxI2CBus for the specified path

Trait Implementations§

source§

impl AsRawFd for LinuxI2CBus

source§

fn as_raw_fd(&self) -> RawFd

Extracts the raw file descriptor. Read more
source§

impl<'a> I2CTransfer<'a> for LinuxI2CBus

source§

fn transfer( &mut self, msgs: &'a mut [Self::Message] ) -> Result<u32, LinuxI2CError>

Issue the provided sequence of I2C transactions

§

type Error = LinuxI2CError

I2C transfer error type
§

type Message = i2c_msg<'a>

I2C transfer message type

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.