19#ifndef CFG_I2C1_PB8_PB9_H
20#define CFG_I2C1_PB8_PB9_H
22#include "periph_cpu.h"
41#elif CPU_FAM_STM32G0 || CPU_FAM_STM32C0
49#if CPU_FAM_STM32F4 || CPU_FAM_STM32F2
50 .rcc_mask = RCC_APB1ENR_I2C1EN,
53#elif CPU_FAM_STM32L4 || CPU_FAM_STM32WB || CPU_FAM_STM32G4
54 .rcc_mask = RCC_APB1ENR1_I2C1EN,
55 .rcc_sw_mask = RCC_CCIPR_I2C1SEL_1,
58 .rcc_mask = RCC_APB1ENR1_I2C1EN,
59 .rcc_sw_mask = RCC_CCIPR1_I2C1SEL_1,
61#elif CPU_FAM_STM32G0 || CPU_FAM_STM32C0
62 .rcc_mask = RCC_APBENR1_I2C1EN,
63 .rcc_sw_mask = RCC_CCIPR_I2C1SEL_1,
66 .rcc_mask = RCC_APB1ENR_I2C1EN,
67 .rcc_sw_mask = RCC_DCKCFGR2_I2C1SEL_1,
69#elif CPU_FAM_STM32F0 || CPU_FAM_STM32L0
70 .rcc_mask = RCC_APB1ENR_I2C1EN,
72 .rcc_sw_mask = RCC_CFGR3_I2C1SW,
79#if CPU_FAM_STM32F4 || CPU_FAM_STM32F2
80#define I2C_0_ISR isr_i2c1_ev
81#elif CPU_FAM_STM32L4 || CPU_FAM_STM32F7 || CPU_FAM_STM32WB || CPU_FAM_STM32L5
82#define I2C_0_ISR isr_i2c1_er
83#elif CPU_FAM_STM32F0 || CPU_FAM_STM32L0 || CPU_FAM_STM32G0 || CPU_FAM_STM32C0
84#define I2C_0_ISR isr_i2c1
87#define I2C_NUMOF ARRAY_SIZE(i2c_config)
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
@ GPIO_AF1
use alternate function 1
@ GPIO_AF4
use alternate function 4
@ GPIO_AF6
use alternate function 6
@ APB1
Advanced Peripheral Bus 1
I2C configuration structure.
TWI_t * dev
Pointer to hardware module registers.