提交 44b91706 编写于 作者: C chaos.proton@gmail.com

bsp/stm32f10x/touch.c: better naming

Rename flag to touched_down.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1788 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 e7eaf16b
......@@ -186,9 +186,9 @@ static void rtgui_touch_calculate()
}
}
static unsigned int flag = 0;
void touch_timeout(void* parameter)
{
static unsigned int touched_down = 0;
struct rtgui_event_mouse emouse;
static struct _touch_previous
{
......@@ -210,7 +210,7 @@ void touch_timeout(void* parameter)
/* stop timer */
rt_timer_stop(touch->poll_timer);
rt_kprintf("touch up: (%d, %d)\n", emouse.x, emouse.y);
flag = 0;
touched_down = 0;
if ((touch->calibrating == RT_TRUE) && (touch->calibration_func != RT_NULL))
{
......@@ -221,7 +221,7 @@ void touch_timeout(void* parameter)
}
else
{
if(flag == 0)
if(touched_down == 0)
{
int tmer = RT_TICK_PER_SECOND/20 ;
/* calculation */
......@@ -241,7 +241,7 @@ void touch_timeout(void* parameter)
emouse.button = (RTGUI_MOUSE_BUTTON_LEFT |RTGUI_MOUSE_BUTTON_DOWN);
// rt_kprintf("touch down: (%d, %d)\n", emouse.x, emouse.y);
flag = 1;
touched_down = 1;
rt_timer_control(touch->poll_timer , RT_TIMER_CTRL_SET_TIME , &tmer);
}
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册