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.