1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-18 22:05:10 +03:00

Touch GPIO def

This commit is contained in:
3djc 2020-02-25 10:34:18 +01:00
parent a83bd2742d
commit 562ee338b1
2 changed files with 20 additions and 0 deletions

View file

@ -95,6 +95,7 @@ void boardInit()
HAPTIC_RCC_AHB1Periph |
INTMODULE_RCC_AHB1Periph |
EXTMODULE_RCC_AHB1Periph |
I2C_TOUCH_RCC_AHB1Periph |
GPS_RCC_AHB1Periph |
SPORT_UPDATE_RCC_AHB1Periph,
ENABLE);
@ -110,6 +111,7 @@ void boardInit()
AUDIO_RCC_APB1Periph |
INTMODULE_RCC_APB1Periph |
EXTMODULE_RCC_APB1Periph |
I2C_TOUCH_RCC_APB1Periph |
GPS_RCC_APB1Periph |
BACKLIGHT_RCC_APB1Periph,
ENABLE);

View file

@ -835,6 +835,24 @@
#define TIMER_2MHz_RCC_APB1Periph RCC_APB1Periph_TIM7
#define TIMER_2MHz_TIMER TIM7
// Touch
#if defined(TOUCHPANEL)
#define I2C_TOUCH_RCC_AHB1Periph RCC_AHB1Periph_GPIOB
#define I2C_TOUCH_RCC_APB1Periph RCC_APB1Periph_I2C1
#define I2C_TOUCH I2C1
#define I2C_TOUCH_GPIO GPIOB
#define I2C_TOUCH_SCL_GPIO_PIN GPIO_Pin_8 // PB.08
#define I2C_TOUCH_SDA_GPIO_PIN GPIO_Pin_7 // PB.07
#define I2C_TOUCH_RESET_GPIO GPIOF
#define I2C_TOUCH_RESET_GPIO_PIN GPIO_Pin_10 // PF.10
#define I2C_TOUCH_INT_GPIO GPIOH
#define I2C_TOUCH_INT_GPIO_PIN GPIO_Pin_3 // PH.03
#else
#define I2C_TOUCH_RCC_AHB1Periph 0
#define I2C_TOUCH_RCC_APB1Periph 0
#endif
// Bluetooth
#define STORAGE_BLUETOOTH
#if defined(BLUETOOTH)