1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/stm32f723e-disco: configure ft5x06 I2C peripheral and int pin

This commit is contained in:
Alexandre Abadie 2021-12-31 10:55:39 +01:00
parent c67920c1cc
commit deeb204a14
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
2 changed files with 35 additions and 1 deletions

View File

@ -60,6 +60,16 @@ extern "C" {
#define BTN0_MODE GPIO_IN
/** @} */
/**
* @name FT5X06 touch panel configuration
* @{
*/
#define FT5X06_PARAM_I2C_DEV I2C_DEV(1) /**< I2C device */
#define FT5X06_PARAM_INT_PIN GPIO_PIN(PORT_I, 9) /**< Interrupt pin */
#define FT5X06_PARAM_XMAX (240) /**< Max width */
#define FT5X06_PARAM_YMAX (240) /**< Max height */
/** @} */
/**
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
*/

View File

@ -155,10 +155,34 @@ static const i2c_conf_t i2c_config[] = {
.bus = APB1,
.rcc_mask = RCC_APB1ENR_I2C2EN,
.irqn = I2C2_ER_IRQn,
}
},
{ /* Connected to touchscreen controller */
.dev = I2C3,
.speed = I2C_SPEED_NORMAL,
.scl_pin = GPIO_PIN(PORT_A, 8),
.sda_pin = GPIO_PIN(PORT_H, 8),
.scl_af = GPIO_AF4,
.sda_af = GPIO_AF4,
.bus = APB1,
.rcc_mask = RCC_APB1ENR_I2C3EN,
.irqn = I2C3_ER_IRQn,
},
{
.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_i2c2_er
#define I2C_1_ISR isr_i2c3_er
#define I2C_2_ISR isr_i2c1_er
#define I2C_NUMOF ARRAY_SIZE(i2c_config)
/** @} */