Struct stm32g0xx_hal::i2c::I2c [−][src]
I2C abstraction
Implementations
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, bytes: &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, bytes: &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,
impl<I2C, SDA, SCL> Unpin for I2c<I2C, SDA, SCL> where
I2C: Unpin,
SCL: Unpin,
SDA: Unpin,
I2C: Unpin,
SCL: Unpin,
SDA: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,