pub struct I2cSlaveDriver<'d> { /* private fields */ }Implementations§
Source§impl<'d> I2cSlaveDriver<'d>
impl<'d> I2cSlaveDriver<'d>
pub fn new<I2C>(
_i2c: I2C,
sda: impl InputPin + OutputPin + 'd,
scl: impl InputPin + OutputPin + 'd,
slave_addr: u8,
config: &SlaveConfig,
) -> Result<I2cSlaveDriver<'d>, EspError>where
I2C: I2c + 'd,
pub fn read( &mut self, buffer: &mut [u8], timeout: u32, ) -> Result<usize, EspError>
pub fn write(&mut self, bytes: &[u8], timeout: u32) -> Result<usize, EspError>
pub fn port(&self) -> u32
Trait Implementations§
Source§impl Drop for I2cSlaveDriver<'_>
Available on non-esp32c2 only.
impl Drop for I2cSlaveDriver<'_>
Available on non-
esp32c2 only.impl Send for I2cSlaveDriver<'_>
Available on non-
esp32c2 only.