[][src]Struct stm32l0xx_hal::i2c::I2c

pub struct I2c<I2C, SDA, SCL> { /* fields omitted */ }

I2C abstraction

Methods

impl<I, SDA, SCL> I2c<I, SDA, SCL> where
    I: Instance
[src]

pub fn new(i2c: I, sda: SDA, scl: SCL, freq: Hertz, rcc: &mut Rcc) -> Self where
    I: Instance,
    SDA: SDAPin<I>,
    SCL: SCLPin<I>, 
[src]

pub fn release(self) -> (I, SDA, SCL)[src]

pub fn write_all<Channel, Buffer>(
    self,
    dma: &mut Handle,
    channel: Channel,
    address: u8,
    buffer: Pin<Buffer>
) -> Transfer<Self, Tx<I>, Channel, Buffer, Ready> where
    Tx<I>: Target<Channel>,
    Channel: Channel,
    Buffer: Deref + 'static,
    Buffer::Target: AsSlice<Element = u8>, 
[src]

pub fn write_some<Channel, Buffer>(
    self,
    dma: &mut Handle,
    channel: Channel,
    address: u8,
    buffer: Pin<Buffer>,
    num_words: usize
) -> Transfer<Self, Tx<I>, Channel, Buffer, Ready> where
    Tx<I>: Target<Channel>,
    Channel: Channel,
    Buffer: Deref + 'static,
    Buffer::Target: AsSlice<Element = u8>, 
[src]

pub fn read_all<Channel, Buffer>(
    self,
    dma: &mut Handle,
    channel: Channel,
    address: u8,
    buffer: Pin<Buffer>
) -> Transfer<Self, Rx<I>, Channel, Buffer, Ready> where
    Rx<I>: Target<Channel>,
    Channel: Channel,
    Buffer: DerefMut + 'static,
    Buffer::Target: AsMutSlice<Element = u8>, 
[src]

pub fn read_some<Channel, Buffer>(
    self,
    dma: &mut Handle,
    channel: Channel,
    address: u8,
    buffer: Pin<Buffer>,
    num_words: usize
) -> Transfer<Self, Rx<I>, Channel, Buffer, Ready> where
    Rx<I>: Target<Channel>,
    Channel: Channel,
    Buffer: DerefMut + 'static,
    Buffer::Target: AsMutSlice<Element = u8>, 
[src]

Trait Implementations

impl<I, SDA, SCL> Read for I2c<I, SDA, SCL> where
    I: Instance
[src]

type Error = Error

Error type

impl<I, SDA, SCL> Write for I2c<I, SDA, SCL> where
    I: Instance
[src]

type Error = Error

Error type

impl<I, SDA, SCL> WriteRead for I2c<I, SDA, SCL> where
    I: Instance
[src]

type Error = Error

Error type

Auto Trait Implementations

impl<I2C, SDA, SCL> Unpin for I2c<I2C, SDA, SCL> where
    I2C: Unpin,
    SCL: Unpin,
    SDA: Unpin

impl<I2C, SDA, SCL> Send for I2c<I2C, SDA, SCL> where
    I2C: Send,
    SCL: Send,
    SDA: Send

impl<I2C, SDA, SCL> Sync for I2c<I2C, SDA, SCL> where
    I2C: Sync,
    SCL: Sync,
    SDA: Sync

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self