summaryrefslogtreecommitdiff
path: root/src/DisplayApp/LittleVgl.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-02-16 17:32:36 (GMT)
committerJF <jf@codingfield.com>2020-02-16 17:32:36 (GMT)
commit167a0ffc873a2442af43d0347efd00f84932b8cc (patch)
tree2e131e3c97b1c67e0dff6bab516a1fe5958e1741 /src/DisplayApp/LittleVgl.h
parent52539a5ff1b6f52c65b032ef1668d43d4df2dc24 (diff)
Add touch panel port to lvgl.
PoC of user interaction with 3 screen (clock, menu and app).
Diffstat (limited to 'src/DisplayApp/LittleVgl.h')
-rw-r--r--src/DisplayApp/LittleVgl.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/DisplayApp/LittleVgl.h b/src/DisplayApp/LittleVgl.h
index cff1c3b..ef10496 100644
--- a/src/DisplayApp/LittleVgl.h
+++ b/src/DisplayApp/LittleVgl.h
@@ -2,26 +2,36 @@
#include <libs/lvgl/src/lv_hal/lv_hal.h>
#include <drivers/St7789.h>
+#include <drivers/Cst816s.h>
static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p);
+static bool touchpad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
namespace Pinetime {
namespace Components {
class LittleVgl {
public:
- LittleVgl(Pinetime::Drivers::St7789& lcd);
+ LittleVgl(Pinetime::Drivers::St7789& lcd, Pinetime::Drivers::Cst816S& touchPanel);
void FlushDisplay(const lv_area_t * area, lv_color_t * color_p);
+ bool GetTouchPadInfo(lv_indev_data_t *ptr);
private:
+ void InitDisplay();
+ void InitTouchpad();
+
Pinetime::Drivers::St7789& lcd;
+ Pinetime::Drivers::Cst816S& touchPanel;
+
lv_disp_buf_t disp_buf_2;
lv_color_t buf2_1[LV_HOR_RES_MAX * 2];
lv_color_t buf2_2[LV_HOR_RES_MAX * 2];
lv_disp_drv_t disp_drv;
+ lv_point_t previousClick;
+
};
}