mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-11-16 12:34:33 +00:00
[errno code][-RT_ERROR] fix that use RT_ERROR without -
This commit is contained in:
committed by
Man, Jianting (Meco)
parent
de963feef4
commit
0f461e870c
@@ -116,7 +116,7 @@ static rt_err_t ft_read_point(touch_msg_t msg)
|
||||
ret = ft_read(ft_i2c_bus, 0X814E, &state, 1);
|
||||
if (ret < 0)
|
||||
{
|
||||
return RT_ERROR;
|
||||
return -RT_ERROR;
|
||||
}
|
||||
|
||||
/* According this state, to get point info */
|
||||
@@ -134,14 +134,14 @@ static rt_err_t ft_read_point(touch_msg_t msg)
|
||||
return RT_EOK;
|
||||
}
|
||||
msg->event = TOUCH_EVENT_NONE;
|
||||
return RT_ERROR;
|
||||
return -RT_ERROR;
|
||||
}
|
||||
|
||||
/* Only support one point */
|
||||
ret = ft_read(ft_i2c_bus, 0X8150, point, 4);
|
||||
if (ret < 0)
|
||||
{
|
||||
return RT_ERROR;
|
||||
return -RT_ERROR;
|
||||
}
|
||||
|
||||
msg->x = (point[1]&0x0F) << 8 | point[0];
|
||||
|
||||
Reference in New Issue
Block a user