refactor: replace lv_coord_t with int32_t
This commit is contained in:
@@ -26,12 +26,12 @@
|
||||
static void touchpad_init(void);
|
||||
static void touchpad_read(lv_indev_t * indev, lv_indev_data_t * data);
|
||||
static bool touchpad_is_pressed(void);
|
||||
static void touchpad_get_xy(lv_coord_t * x, lv_coord_t * y);
|
||||
static void touchpad_get_xy(int32_t * x, int32_t * y);
|
||||
|
||||
static void mouse_init(void);
|
||||
static void mouse_read(lv_indev_t * indev, lv_indev_data_t * data);
|
||||
static bool mouse_is_pressed(void);
|
||||
static void mouse_get_xy(lv_coord_t * x, lv_coord_t * y);
|
||||
static void mouse_get_xy(int32_t * x, int32_t * y);
|
||||
|
||||
static void keypad_init(void);
|
||||
static void keypad_read(lv_indev_t * indev, lv_indev_data_t * data);
|
||||
@@ -182,8 +182,8 @@ static void touchpad_init(void)
|
||||
/*Will be called by the library to read the touchpad*/
|
||||
static void touchpad_read(lv_indev_t * indev_drv, lv_indev_data_t * data)
|
||||
{
|
||||
static lv_coord_t last_x = 0;
|
||||
static lv_coord_t last_y = 0;
|
||||
static int32_t last_x = 0;
|
||||
static int32_t last_y = 0;
|
||||
|
||||
/*Save the pressed coordinates and the state*/
|
||||
if(touchpad_is_pressed()) {
|
||||
@@ -208,7 +208,7 @@ static bool touchpad_is_pressed(void)
|
||||
}
|
||||
|
||||
/*Get the x and y coordinates if the touchpad is pressed*/
|
||||
static void touchpad_get_xy(lv_coord_t * x, lv_coord_t * y)
|
||||
static void touchpad_get_xy(int32_t * x, int32_t * y)
|
||||
{
|
||||
/*Your code comes here*/
|
||||
|
||||
@@ -250,7 +250,7 @@ static bool mouse_is_pressed(void)
|
||||
}
|
||||
|
||||
/*Get the x and y coordinates if the mouse is pressed*/
|
||||
static void mouse_get_xy(lv_coord_t * x, lv_coord_t * y)
|
||||
static void mouse_get_xy(int32_t * x, int32_t * y)
|
||||
{
|
||||
/*Your code comes here*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user