mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/stm32f429i-disc1: add i2c configuration
This commit is contained in:
parent
ce11ad52c5
commit
6932709163
@ -1,4 +1,5 @@
|
||||
# Put defined MCU peripherals here (in alphabetical order)
|
||||
FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
|
@ -96,6 +96,30 @@ static const spi_conf_t spi_config[] = {
|
||||
#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name I2C configuration
|
||||
* @{
|
||||
*/
|
||||
static const i2c_conf_t i2c_config[] = {
|
||||
{
|
||||
.dev = I2C3,
|
||||
.speed = I2C_SPEED_NORMAL,
|
||||
.scl_pin = GPIO_PIN(PORT_A, 8),
|
||||
.sda_pin = GPIO_PIN(PORT_C, 9),
|
||||
.scl_af = GPIO_AF4,
|
||||
.sda_af = GPIO_AF4,
|
||||
.bus = APB1,
|
||||
.rcc_mask = RCC_APB1ENR_I2C3EN,
|
||||
.clk = CLOCK_APB1,
|
||||
.irqn = I2C3_EV_IRQn,
|
||||
}
|
||||
};
|
||||
|
||||
#define I2C_0_ISR isr_i2c3_ev
|
||||
|
||||
#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user