Struct linux_embedded_hal::I2cdev
[−]
[src]
pub struct I2cdev { /* fields omitted */ }
Newtype around i2cdev::linux::LinuxI2CDevice
that implements the embedded-hal
traits
Methods
impl I2cdev
[src]
fn new<P>(path: P) -> Result<Self, LinuxI2CError> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
See i2cdev::linux::LinuxI2CDevice::new
for details.
Methods from Deref<Target = LinuxI2CDevice>
Trait Implementations
impl Read for I2cdev
[src]
type Error = LinuxI2CError
Error type
fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error>
[src]
Reads enough bytes from slave with address
to fill buffer
Read more
impl Write for I2cdev
[src]
type Error = LinuxI2CError
Error type
fn write(&mut self, address: u8, bytes: &[u8]) -> Result<(), Self::Error>
[src]
Sends bytes to slave with address addr
Read more
impl WriteRead for I2cdev
[src]
type Error = LinuxI2CError
Error type
fn write_read(
&mut self,
address: u8,
bytes: &[u8],
buffer: &mut [u8]
) -> Result<(), Self::Error>
[src]
&mut self,
address: u8,
bytes: &[u8],
buffer: &mut [u8]
) -> Result<(), Self::Error>
Sends bytes to slave with address addr
and then reads enough bytes to fill buffer
in a single transaction Read more
impl Deref for I2cdev
[src]
type Target = LinuxI2CDevice
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.