[errno code][-RT_ERROR] fix that use RT_ERROR without -

This commit is contained in:
Meco Man
2023-03-17 00:12:16 -04:00
committed by Man, Jianting (Meco)
parent de963feef4
commit 0f461e870c
272 changed files with 639 additions and 644 deletions

View File

@@ -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];