Loading...
Searching...
No Matches
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 []
 

Macro Definition Documentation

◆ I2C_0_ISR

#define I2C_0_ISR   isr_i2c1

Definition at line 60 of file cfg_i2c1_pb6_pb7.h.

◆ I2C_NUMOF

#define I2C_NUMOF   ARRAY_SIZE(i2c_config)

Definition at line 63 of file cfg_i2c1_pb6_pb7.h.

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
}
}
@ PORT_B
port B
Definition periph_cpu.h:48
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
Definition periph_cpu.h:278
@ GPIO_AF1
use alternate function 1
Definition cpu_gpio.h:103
@ APB1
Advanced Peripheral Bus 1
Definition periph_cpu.h:79

Definition at line 32 of file cfg_i2c1_pb6_pb7.h.