This commit is contained in:
刘可亮
2024-09-03 11:16:08 +08:00
parent cf270df8d6
commit 803cac77d5
2931 changed files with 614364 additions and 31222 deletions

View File

@@ -1,24 +0,0 @@
menu "St16xx touch panel options"
config AIC_TOUCH_PANEL_ST16XX
bool "Using touch panel st16xx"
default n
select AIC_I2C_DRV
config AIC_TOUCH_PANEL_ST16XX_I2C_CHA
string "st16xx using i2c channel index"
default "i2c3"
depends on AIC_TOUCH_PANEL_ST16XX
config AIC_TOUCH_PANEL_ST16XX_RST_PIN
string "st16xx reset pin"
default "PA.8"
depends on AIC_TOUCH_PANEL_ST16XX
config AIC_TOUCH_PANEL_ST16XX_INT_PIN
string "st16xx irq pin"
default "PA.9"
depends on AIC_TOUCH_PANEL_ST16XX
endmenu

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024-2025, ArtInChip Technology Co., Ltd
* Copyright (c) 2024, ArtInChip Technology Co., Ltd
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -26,10 +26,6 @@
#define ST16XX_MAX_TOUCH 5
#define ST16XX_POINT_INFO_NUM 8
#define ST16XX_RESET_PIN AIC_TOUCH_PANEL_ST16XX_RST_PIN
#define ST16XX_IRQ_PIN AIC_TOUCH_PANEL_ST16XX_INT_PIN
#define ST16XX_I2C_CHAN AIC_TOUCH_PANEL_ST16XX_I2C_CHA
int rt_hw_st16xx_init(const char *name, struct rt_touch_config *cfg);
#endif

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024-2025, ArtInChip Technology Co., Ltd
* Copyright (c) 2024, ArtInChip Technology Co., Ltd
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -277,13 +277,13 @@ static int rt_st16xx_gpio_cfg()
long pin;
// RST
pin = drv_pin_get(ST16XX_RESET_PIN);
pin = drv_pin_get(AIC_TOUCH_PANEL_RST_PIN);
g = GPIO_GROUP(pin);
p = GPIO_GROUP_PIN(pin);
hal_gpio_direction_input(g, p);
// INT
pin = drv_pin_get(ST16XX_IRQ_PIN);
pin = drv_pin_get(AIC_TOUCH_PANEL_INT_PIN);
g = GPIO_GROUP(pin);
p = GPIO_GROUP_PIN(pin);
hal_gpio_direction_input(g, p);
@@ -360,9 +360,9 @@ static int rt_hw_st16xx_port(void)
rt_st16xx_gpio_cfg();
rst_pin = drv_pin_get(ST16XX_RESET_PIN);
cfg.dev_name = ST16XX_I2C_CHAN;
cfg.irq_pin.pin = drv_pin_get(ST16XX_IRQ_PIN);
rst_pin = drv_pin_get(AIC_TOUCH_PANEL_RST_PIN);
cfg.dev_name = AIC_TOUCH_PANEL_I2C_CHAN;
cfg.irq_pin.pin = drv_pin_get(AIC_TOUCH_PANEL_INT_PIN);
cfg.irq_pin.mode = PIN_MODE_INPUT;
cfg.user_data = &rst_pin;