diff --git a/bsp/stm32f10x/touch.c b/bsp/stm32f10x/touch.c index aeddda599ba1e793d4b9ecfdea8be701a6f72689..b672ccdb4d42f6205e8f16a17eab93a38309ba08 100644 --- a/bsp/stm32f10x/touch.c +++ b/bsp/stm32f10x/touch.c @@ -196,6 +196,10 @@ void touch_timeout(void* parameter) rt_uint32_t y; } touch_previous; + /* touch time is too short and we lost the position already. */ + if ((!touch_down) && GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_0) != 0) + return; + if (GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_1) != 0) { int tmer = RT_TICK_PER_SECOND/8 ;