ARMEBS4  revision-26.06.2015
Macros | Functions | Variables
stm32_i2c.c File Reference

i2c bus More...

#include "heivs/stm32_i2c.h"
#include "heivs/time.h"
#include "heivs/bsp.h"
#include "stm32/stm32f4xx_i2c.h"
#include "stm32/stm32f4xx_rcc.h"
#include "heivs/delay.h"
Include dependency graph for stm32_i2c.c:

Go to the source code of this file.

Macros

#define I2C_STD_TIMEOUT_MS
 

Functions

static void workaround_reset_i2c_devices (const struct gpio_t *pins)
 Workaround i2c devices without reset pins. More...
 

Variables

const struct heivs_bus_t bus_i2c [BSP_I2C_BUS_COUNT]
 All i2c busses.
 

Detailed Description

i2c bus

Author
marc dot pignat at hevs dot ch

Definition in file stm32_i2c.c.

Macro Definition Documentation

#define I2C_STD_TIMEOUT_MS

FIXME : if a device NACK, this will trigger the timeout error

Definition at line 17 of file stm32_i2c.c.

Function Documentation

static void workaround_reset_i2c_devices ( const struct gpio_t pins)
static

Workaround i2c devices without reset pins.

Force-reset any device which is stuck in an i2c transfer

Definition at line 24 of file stm32_i2c.c.

References delay_wait_us(), GPIO_OD, GPIO_OUTPUT_1, gpio_set(), gpio_setup(), GPIO_SPEED_100, and gpio_t::mode.

Here is the call graph for this function: