boards/nucleo-f722ze provide i2c configuration
This commit is contained in:
parent
d8c51dc373
commit
2e6a80ce4e
@ -1,5 +1,6 @@
|
|||||||
# Put defined MCU peripherals here (in alphabetical order)
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
FEATURES_PROVIDED += periph_gpio
|
FEATURES_PROVIDED += periph_gpio
|
||||||
|
FEATURES_PROVIDED += periph_i2c
|
||||||
FEATURES_PROVIDED += periph_rtc
|
FEATURES_PROVIDED += periph_rtc
|
||||||
FEATURES_PROVIDED += periph_timer
|
FEATURES_PROVIDED += periph_timer
|
||||||
FEATURES_PROVIDED += periph_uart
|
FEATURES_PROVIDED += periph_uart
|
||||||
|
|||||||
@ -136,6 +136,29 @@ static const uart_conf_t uart_config[] = {
|
|||||||
#define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0]))
|
#define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0]))
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name I2C configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static const i2c_conf_t i2c_config[] = {
|
||||||
|
{
|
||||||
|
.dev = I2C1,
|
||||||
|
.speed = I2C_SPEED_NORMAL,
|
||||||
|
.scl_pin = GPIO_PIN(PORT_B, 8),
|
||||||
|
.sda_pin = GPIO_PIN(PORT_B, 9),
|
||||||
|
.scl_af = GPIO_AF4,
|
||||||
|
.sda_af = GPIO_AF4,
|
||||||
|
.bus = APB1,
|
||||||
|
.rcc_mask = RCC_APB1ENR_I2C1EN,
|
||||||
|
.irqn = I2C1_ER_IRQn,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#define I2C_0_ISR isr_i2c1_er
|
||||||
|
|
||||||
|
#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name ADC configuration
|
* @name ADC configuration
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user