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

boards/stm32f746g-disco: configure ft5336 I2C peripheral and int pin

This commit is contained in:
Alexandre Abadie 2021-12-27 11:27:13 +01:00
parent 444170ed04
commit 0080657d63
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
3 changed files with 46 additions and 2 deletions

View File

@ -28,7 +28,7 @@ Current hardware support:
| USB OTG FS | X | |
| USB OTG HS | - | |
| TFT LCD | X | |
| Capacitive touch screen | - | |
| Capacitive touch screen | X | |
| User microphones | - | |
| External Quad-SPI Flash | - | |
| External SDRAM | - | |

View File

@ -65,6 +65,16 @@ extern "C" {
#define BTN0_MODE GPIO_IN /**< BTN0 pin mode */
/** @} */
/**
* @name FT5X06 touch panel configuration
* @{
*/
#define FT5X06_PARAM_I2C_DEV I2C_DEV(1) /**< I2C device */
#define FT5X06_PARAM_INT_PIN GPIO_PIN(PORT_I, 13) /**< Interrupt pin */
#define FT5X06_PARAM_XMAX (480) /**< Max width */
#define FT5X06_PARAM_YMAX (272) /**< Max height */
/** @} */
/**
* @brief Initialize board specific hardware
*/

View File

@ -36,7 +36,6 @@
#include "periph_cpu.h"
#include "clk_conf.h"
#include "cfg_i2c1_pb8_pb9.h"
#include "cfg_rtt_default.h"
#include "cfg_timer_tim2.h"
#include "cfg_usb_otg_fs.h"
@ -147,6 +146,41 @@ static const spi_conf_t spi_config[] = {
#define SPI_NUMOF ARRAY_SIZE(spi_config)
/** @} */
/**
* @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,
},
{
.dev = I2C3,
.speed = I2C_SPEED_NORMAL,
.scl_pin = GPIO_PIN(PORT_H, 7),
.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,
},
};
#define I2C_0_ISR isr_i2c1_er
#define I2C_1_ISR isr_i2c3_er
#define I2C_NUMOF ARRAY_SIZE(i2c_config)
/** @} */
/**
* @name ETH configuration
* @{