1 #ifndef STM32F103CB_I2C_H_ 2 #define STM32F103CB_I2C_H_ 51 #include <libopencm3/stm32/i2c.h> 57 #define I2C_TIMEOUT 500000 62 #define I2C_MY_ADDRESS 0x32 mcu_error I2C_address(i2c_periph peripheral, uint8_t address, uint8_t operation)
Send a seven bit address on the bus.
Header file for stm32f103cb DEBUG.
Header file for stm32f103 GPIO.
mcu_error I2C_setup(i2c_periph peripheral)
Initialize I2C data structure and setup port.
mcu_error I2C_stop(i2c_periph peripheral)
Generate a stop condition on the bus.
uint8_t I2C_read(i2c_periph peripheral)
Read one byte from the bus without acknowledge generation.
i2c_periph
I2C ports available on the MCU.
mcu_error I2C_start(i2c_periph peripheral)
Generate a start condition on the bus.
uint8_t I2C_repeatRead(i2c_periph peripheral)
Read one byte from the bus with acknowledge generation.
mcu_error I2C_write(i2c_periph peripheral, uint8_t byte)
Send one byte on the bus.
mcu_error
Error enumerators for the Debug peripheral.