Enum stm32_hal2::i2c::I2cMode
source · [−]#[repr(u8)]
pub enum I2cMode {
Master,
Slave,
}
Expand description
Set master or slave mode. Sets the __ register, _ field.
Variants
Master
In Master mode, the I2C interface initiates a data transfer and generates the clock signal. A serial data transfer always begins with a START condition and ends with a STOP condition. Both START and STOP conditions are generated in master mode by software.
Slave
In Slave mode, the interface is capable of recognizing its own addresses (7 or 10-bit), and the general call address. The general call address detection can be enabled or disabled by software. The reserved SMBus addresses can also be enabled by software.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for I2cMode
impl Send for I2cMode
impl Sync for I2cMode
impl Unpin for I2cMode
impl UnwindSafe for I2cMode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more