ARMEBS4  revision-26.06.2015
stm32_i2c.h
Go to the documentation of this file.
1 /************************************************************************//**
2  * \file heivs/stm32_i2c.h
3  * \brief i2c bus
4  * \author marc dot pignat at hevs dot ch
5  *
6  * \defgroup i2c_bus i2c bus
7  * @{
8  * \brief i2c bus.
9  * \ingroup bus
10  ***************************************************************************/
11 #ifndef HEIVS_STM32_I2C_H
12 #define HEIVS_STM32_I2C_H
13 
14 #include "heivs/bus.h"
15 #include "heivs/stm32_gpio.h"
16 #include "heivs/bsp.h"
17 
18 /**
19  * \brief i2c specific data
20  */
22 {
23  I2C_TypeDef *ctrl; ///< Bus controller
24  const struct gpio_t gpios[2]; ///< Gpios
25 };
26 
27 #ifdef __cplusplus
28  extern "C" {
29 #endif
30 
31 /**
32  * \brief All i2c busses
33  */
34 extern const struct heivs_bus_t bus_i2c[BSP_I2C_BUS_COUNT];
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 /**
41  * @}
42  */
43 #endif /* HEIVS_STM32_I2C_H */
bus abstraction
Bus handler.
Definition: bus.h:92
BSP - Board Support Package.
I2C_TypeDef * ctrl
Bus controller.
Definition: stm32_i2c.h:23
const struct gpio_t gpios[2]
Gpios.
Definition: stm32_i2c.h:24
#define BSP_I2C_BUS_COUNT
Number of i2c buses.
Definition: bsp_armebs4.h:25
board specific defines
GPIO control structure.
Definition: stm32_gpio.h:96
const struct heivs_bus_t bus_i2c[BSP_I2C_BUS_COUNT]
All i2c busses.
Definition: stm32_i2c.c:424
i2c specific data
Definition: stm32_i2c.h:21
Inter-integrated Circuit Interface.
Definition: stm32f4xx.h:674