aboutsummaryrefslogtreecommitdiff
path: root/examples/porting/lv_port_indev_template.c
diff options
context:
space:
mode:
authorGabor Kiss-Vamosi <kisvegabor@gmail.com>2023-10-31 19:25:01 +0100
committerGabor Kiss-Vamosi <kisvegabor@gmail.com>2023-10-31 19:25:01 +0100
commita5a58e39d2abbb66b57cf27f3c4a1d25f9ac6b3d (patch)
tree3046130dce1b174fea713d07843b65ce6374dd4b /examples/porting/lv_port_indev_template.c
parentd456b1cb4da4795e3b2f64ec484f624fa127471d (diff)
downloadlvgl-a5a58e39d2abbb66b57cf27f3c4a1d25f9ac6b3d.tar.gz
lvgl-a5a58e39d2abbb66b57cf27f3c4a1d25f9ac6b3d.zip
refactor: replace lv_coord_t with int32_t
Diffstat (limited to 'examples/porting/lv_port_indev_template.c')
-rw-r--r--examples/porting/lv_port_indev_template.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/porting/lv_port_indev_template.c b/examples/porting/lv_port_indev_template.c
index 1bfd11a9c..8c3a0908f 100644
--- a/examples/porting/lv_port_indev_template.c
+++ b/examples/porting/lv_port_indev_template.c
@@ -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*/