diff --git a/embassy-rp/src/i2c/i2c_device.rs b/embassy-rp/src/i2c/i2c_slave.rs similarity index 98% rename from embassy-rp/src/i2c/i2c_device.rs rename to embassy-rp/src/i2c/i2c_slave.rs index 5c78a86e..154a0f32 100644 --- a/embassy-rp/src/i2c/i2c_device.rs +++ b/embassy-rp/src/i2c/i2c_slave.rs @@ -35,32 +35,32 @@ pub enum ReadStatus { LeftoverBytes(u16), } -/// Device Configuration +/// Slave Configuration #[non_exhaustive] #[derive(Copy, Clone)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] -pub struct DeviceConfig { +pub struct SlaveConfig { /// Target Address pub addr: u16, } -impl Default for DeviceConfig { +impl Default for SlaveConfig { fn default() -> Self { Self { addr: 0x55 } } } -pub struct I2cDevice<'d, T: Instance> { +pub struct I2cSlave<'d, T: Instance> { phantom: PhantomData<&'d mut T>, } -impl<'d, T: Instance> I2cDevice<'d, T> { +impl<'d, T: Instance> I2cSlave<'d, T> { pub fn new( _peri: impl Peripheral
+ 'd, scl: impl Peripheral
> + 'd, sda: impl Peripheral
> + 'd,
_irq: impl Binding