Struct stm32f412g::i2c::I2C
source · pub struct I2C<'a> { /* private fields */ }
Implementations§
source§impl<'a> I2C<'a>
impl<'a> I2C<'a>
pub fn new(clocks: &'a dyn Stm32f4Clocks) -> I2C<'a>
pub fn set_speed(&self, speed: I2CSpeed, system_clock_in_mhz: usize)
pub fn is_enabled_clock(&self) -> bool
pub fn enable_clock(&self)
pub fn disable_clock(&self)
pub fn handle_event(&self)
pub fn handle_error(&self)
Trait Implementations§
source§impl<'a> I2CMaster<'a> for I2C<'a>
impl<'a> I2CMaster<'a> for I2C<'a>
fn set_master_client(&self, master_client: &'a dyn I2CHwMasterClient)
fn enable(&self)
fn disable(&self)
fn write_read( &self, addr: u8, data: &'static mut [u8], write_len: usize, read_len: usize, ) -> Result<(), (Error, &'static mut [u8])>
fn write( &self, addr: u8, data: &'static mut [u8], len: usize, ) -> Result<(), (Error, &'static mut [u8])>
fn read( &self, addr: u8, buffer: &'static mut [u8], len: usize, ) -> Result<(), (Error, &'static mut [u8])>
Auto Trait Implementations§
impl<'a> !Freeze for I2C<'a>
impl<'a> !RefUnwindSafe for I2C<'a>
impl<'a> !Send for I2C<'a>
impl<'a> !Sync for I2C<'a>
impl<'a> Unpin for I2C<'a>
impl<'a> !UnwindSafe for I2C<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more