#include "i2c.h"
#include "dma.h"
#include "systick.h"
#include "stm32f4xx_i2c.h"
#include "stm32f4xx_dma.h"
#include <boards.h>
Go to the source code of this file.
◆ MAX_I2C_TIME
Reset an I2C bus.
Reset is accomplished by clocking out pulses until any hung slaves release SDA and SCL, then generating a START condition, then a STOP condition.
- Parameters
-
Definition at line 269 of file i2c.c.
Referenced by i2c_bus_reset().
◆ I2C_Dir
Definition at line 74 of file i2c.c.
◆ delay_10us()
static void delay_10us |
( |
| ) |
|
|
static |
◆ ev_handler()
static void ev_handler |
( |
const i2c_dev * |
dev, |
|
|
bool |
err |
|
) |
| |
|
static |
◆ I2C1_ER_IRQHandler()
void I2C1_ER_IRQHandler |
( |
| ) |
|
◆ I2C1_EV_IRQHandler()
void I2C1_EV_IRQHandler |
( |
| ) |
|
◆ I2C2_ER_IRQHandler()
void I2C2_ER_IRQHandler |
( |
| ) |
|
◆ I2C2_EV_IRQHandler()
void I2C2_EV_IRQHandler |
( |
| ) |
|
◆ I2C3_ER_IRQHandler()
void I2C3_ER_IRQHandler |
( |
| ) |
|
◆ I2C3_EV_IRQHandler()
void I2C3_EV_IRQHandler |
( |
| ) |
|
◆ i2c_bus_reset()
bool i2c_bus_reset |
( |
const i2c_dev * |
dev | ) |
|
◆ i2c_deinit()
void i2c_deinit |
( |
const i2c_dev * |
dev | ) |
|
◆ i2c_init()
void i2c_init |
( |
const i2c_dev * |
dev, |
|
|
uint16_t |
address, |
|
|
uint32_t |
speed |
|
) |
| |
◆ i2c_lowLevel_deinit()
void i2c_lowLevel_deinit |
( |
const i2c_dev * |
dev | ) |
|
DeInitializes peripherals used by the I2C driver.
- Parameters
-
- Return values
-
< GPIO configuration
< Configure I2C pins: SCL
< Configure I2C pins: SDA
Definition at line 87 of file i2c.c.
Referenced by i2c_deinit().
◆ i2c_lowLevel_init()
static void i2c_lowLevel_init |
( |
const i2c_dev * |
dev | ) |
|
|
inlinestatic |
Initializes peripherals used by the I2C driver.
Definition at line 121 of file i2c.c.
Referenced by i2c_init().
◆ i2c_master_release_bus()
void i2c_master_release_bus |
( |
const i2c_dev * |
dev | ) |
|
◆ i2c_bit_time