Home | Projects | Notes > MCU Peripheral Drivers > I2C Driver (stm32f407xx_i2c_driver.h/.c)

I2C Driver (stm32f407xx_i2c_driver.h/.c)

 

SPI Driver API Requirements

SPIx Peripheral Configurable Items for User Applications

Exercise

  1. Create stm32f407xx_i2c_driver.c and stm32f407xx_i2c_driver.h

  2. Add I2Cx related details to MCU specific header file

    • I2C peripheral register definition structure

    • I2Cx base address macros

    • I2Cx peripheral definition macros

    • Macros to enable and disable I2Cx peripheral clock

    • Bit position definitions of I2C peripheral

 

Code

stm32f407xx_i2c_driver.h

Path: Project/Drivers/Inc/

 

stm32f407xx_i2c_driver.c

Path: Project/Drivers/Src/