[−][src]Struct stm32g0xx_hal::i2c::I2c
I2C abstraction
Methods
impl<SDA, SCL> I2c<I2C1, SDA, SCL>
[src]
pub fn i2c1(
i2c: I2C1,
sda: SDA,
scl: SCL,
config: Config,
rcc: &mut Rcc
) -> Self where
SDA: SDAPin<I2C1>,
SCL: SCLPin<I2C1>,
[src]
i2c: I2C1,
sda: SDA,
scl: SCL,
config: Config,
rcc: &mut Rcc
) -> Self where
SDA: SDAPin<I2C1>,
SCL: SCLPin<I2C1>,
pub fn release(self) -> (I2C1, SDA, SCL)
[src]
impl<SDA, SCL> I2c<I2C2, SDA, SCL>
[src]
pub fn i2c2(
i2c: I2C2,
sda: SDA,
scl: SCL,
config: Config,
rcc: &mut Rcc
) -> Self where
SDA: SDAPin<I2C2>,
SCL: SCLPin<I2C2>,
[src]
i2c: I2C2,
sda: SDA,
scl: SCL,
config: Config,
rcc: &mut Rcc
) -> Self where
SDA: SDAPin<I2C2>,
SCL: SCLPin<I2C2>,
pub fn release(self) -> (I2C2, SDA, SCL)
[src]
Trait Implementations
impl<SDA, SCL> Read for I2c<I2C1, SDA, SCL>
[src]
type Error = Error
Error type
fn read(&mut self, addr: u8, buffer: &mut [u8]) -> Result<(), Self::Error>
[src]
impl<SDA, SCL> Read for I2c<I2C2, SDA, SCL>
[src]
type Error = Error
Error type
fn read(&mut self, addr: u8, buffer: &mut [u8]) -> Result<(), Self::Error>
[src]
impl<SDA, SCL> Write for I2c<I2C1, SDA, SCL>
[src]
type Error = Error
Error type
fn write(&mut self, addr: u8, bytes: &[u8]) -> Result<(), Self::Error>
[src]
impl<SDA, SCL> Write for I2c<I2C2, SDA, SCL>
[src]
type Error = Error
Error type
fn write(&mut self, addr: u8, bytes: &[u8]) -> Result<(), Self::Error>
[src]
impl<SDA, SCL> WriteRead for I2c<I2C1, SDA, SCL>
[src]
type Error = Error
Error type
fn write_read(
&mut self,
addr: u8,
bytes: &[u8],
buffer: &mut [u8]
) -> Result<(), Self::Error>
[src]
&mut self,
addr: u8,
bytes: &[u8],
buffer: &mut [u8]
) -> Result<(), Self::Error>
impl<SDA, SCL> WriteRead for I2c<I2C2, SDA, SCL>
[src]
Auto Trait Implementations
impl<I2C, SDA, SCL> Send for I2c<I2C, SDA, SCL> where
I2C: Send,
SCL: Send,
SDA: Send,
I2C: Send,
SCL: Send,
SDA: Send,
impl<I2C, SDA, SCL> Sync for I2c<I2C, SDA, SCL> where
I2C: Sync,
SCL: Sync,
SDA: Sync,
I2C: Sync,
SCL: Sync,
SDA: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,