mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-17 03:48:55 +00:00
解决上电和长期运行屏幕触摸无效的问题
This commit is contained in:
@@ -58,7 +58,7 @@ static void touch_entry(void *parameter) /* touch panel control entry */
|
||||
|
||||
while (1)
|
||||
{
|
||||
rt_sem_take(touch_sem, RT_WAITING_FOREVER);
|
||||
// rt_sem_take(touch_sem, RT_WAITING_FOREVER);
|
||||
int num = rt_device_read(dev, 0, read_data, info.point_num);
|
||||
if (num > 0)
|
||||
{
|
||||
@@ -81,19 +81,26 @@ static void touch_entry(void *parameter) /* touch panel control entry */
|
||||
}
|
||||
}
|
||||
}
|
||||
//aicos_msleep(10);
|
||||
rt_device_control(dev, RT_TOUCH_CTRL_ENABLE_INT, RT_NULL);
|
||||
|
||||
// rt_device_control(dev, RT_TOUCH_CTRL_ENABLE_INT, RT_NULL);//处理完毕再使能中断
|
||||
|
||||
/*
|
||||
* If using polling mode,
|
||||
* the following conmments must be opened,
|
||||
* and the masking related to semaphores must be removed.
|
||||
*/
|
||||
rt_thread_mdelay(10);
|
||||
}
|
||||
}
|
||||
|
||||
static rt_err_t rx_callback(rt_device_t dev, rt_size_t size)
|
||||
{
|
||||
rt_sem_release(touch_sem);
|
||||
rt_device_control(dev, RT_TOUCH_CTRL_DISABLE_INT, RT_NULL);
|
||||
#ifdef AIC_PM_DEMO
|
||||
extern struct rt_event pm_event;
|
||||
rt_event_send(&pm_event, 2);
|
||||
#endif
|
||||
// rt_sem_release(touch_sem);
|
||||
// rt_device_control(dev, RT_TOUCH_CTRL_DISABLE_INT, RT_NULL);//中断来了 暂时关闭中断 等处理完毕再打开
|
||||
// #ifdef AIC_PM_DEMO
|
||||
// extern struct rt_event pm_event;
|
||||
// rt_event_send(&pm_event, 2);
|
||||
// #endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -105,7 +112,7 @@ int tpc_run(const char *name, rt_uint16_t x, rt_uint16_t y)
|
||||
rt_kprintf("can't find device:%s\n", name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
//中断接收
|
||||
if (rt_device_open(dev, RT_DEVICE_FLAG_INT_RX) != RT_EOK)
|
||||
{
|
||||
rt_kprintf("dev %s is occupied by someone!\n", name);
|
||||
|
||||
BIN
packages/artinchip/lvgl-ui/aic_drivers/lv_tpc_run.zip
Normal file
BIN
packages/artinchip/lvgl-ui/aic_drivers/lv_tpc_run.zip
Normal file
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user