cfg_i2c1_pb6_pb7.h File Reference

Common configuration for STM32 I2C. More...

Detailed Description

Common configuration for STM32 I2C.

Author
Alexandre Abadie alexa.nosp@m.ndre.nosp@m..abad.nosp@m.ie@i.nosp@m.nria..nosp@m.fr

Definition in file cfg_i2c1_pb6_pb7.h.

#include "periph_cpu.h"
+ Include dependency graph for cfg_i2c1_pb6_pb7.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

I2C configuration

#define I2C_0_ISR   isr_i2c1
 
#define I2C_NUMOF   ARRAY_SIZE(i2c_config)
 
static const i2c_conf_t i2c_config []
 

Variable Documentation

◆ i2c_config

const i2c_conf_t i2c_config[]
static
Initial value:
= {
{
.dev = I2C1,
.speed = I2C_SPEED_NORMAL,
.scl_pin = GPIO_PIN(PORT_B, 6),
.sda_pin = GPIO_PIN(PORT_B, 7),
.scl_af = GPIO_AF1,
.sda_af = GPIO_AF1,
.bus = APB1,
.rcc_mask = RCC_APB1ENR_I2C1EN,
.irqn = I2C1_IRQn
}
}

Definition at line 32 of file cfg_i2c1_pb6_pb7.h.

I2C_SPEED_NORMAL
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
Definition: i2c.h:177
GPIO_AF1
@ GPIO_AF1
use alternate function 1
Definition: periph_cpu_common.h:87
GPIO_PIN
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35
PORT_B
@ PORT_B
port B
Definition: periph_cpu.h:37
APB1
@ APB1
APB1 bus.
Definition: periph_cpu.h:176