aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/LittleVgl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/LittleVgl.cpp')
-rw-r--r--src/displayapp/LittleVgl.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/displayapp/LittleVgl.cpp b/src/displayapp/LittleVgl.cpp
index 89893cf7..c6f6f784 100644
--- a/src/displayapp/LittleVgl.cpp
+++ b/src/displayapp/LittleVgl.cpp
@@ -152,10 +152,6 @@ void LittleVgl::SetFullRefresh(FullRefreshDirections direction) {
void LittleVgl::FlushDisplay(const lv_area_t* area, lv_color_t* color_p) {
uint16_t y1, y2, width, height = 0;
- ulTaskNotifyTake(pdTRUE, 200);
- // Notification is still needed (even if there is a mutex on SPI) because of the DataCommand pin
- // which cannot be set/clear during a transfer.
-
if ((scrollDirection == LittleVgl::FullRefreshDirections::Down) && (area->y2 == visibleNbLines - 1)) {
writeOffset = ((writeOffset + totalNbLines) - visibleNbLines) % totalNbLines;
} else if ((scrollDirection == FullRefreshDirections::Up) && (area->y1 == 0)) {
@@ -219,7 +215,6 @@ void LittleVgl::FlushDisplay(const lv_area_t* area, lv_color_t* color_p) {
if (height > 0) {
lcd.DrawBuffer(area->x1, y1, width, height, reinterpret_cast<const uint8_t*>(color_p), width * height * 2);
- ulTaskNotifyTake(pdTRUE, 100);
}
uint16_t pixOffset = width * height;
@@ -253,6 +248,8 @@ void LittleVgl::SetNewTouchPoint(int16_t x, int16_t y, bool contact) {
}
}
+// Cancel an ongoing tap
+// Signifies that LVGL should not handle the current tap
void LittleVgl::CancelTap() {
if (tapped) {
isCancelled = true;
@@ -260,6 +257,13 @@ void LittleVgl::CancelTap() {
}
}
+// Clear the current tapped state
+// Signifies that touch input processing is suspended
+void LittleVgl::ClearTouchState() {
+ touchPoint = {-1, -1};
+ tapped = false;
+}
+
bool LittleVgl::GetTouchPadInfo(lv_indev_data_t* ptr) {
ptr->point.x = touchPoint.x;
ptr->point.y = touchPoint.y;