pub struct I2cSlaveDriver<'d> { /* private fields */ }Implementations§
Source§impl<'d> I2cSlaveDriver<'d>
impl<'d> I2cSlaveDriver<'d>
pub fn new<I2C: I2c + 'd>( _i2c: I2C, sda: impl InputPin + OutputPin + 'd, scl: impl InputPin + OutputPin + 'd, slave_addr: u8, config: &SlaveConfig, ) -> Result<Self, EspError>
pub fn read( &mut self, buffer: &mut [u8], timeout: TickType_t, ) -> Result<usize, EspError>
pub fn write( &mut self, bytes: &[u8], timeout: TickType_t, ) -> Result<usize, EspError>
pub fn port(&self) -> i2c_port_t
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.