@@ -220,10 +220,6 @@ void MoveScreen(lv_disp_drv_t *disp_drv, int16_t height) {
220
220
void LittleVgl::FlushDisplay (const lv_area_t * area, lv_color_t * color_p) {
221
221
uint16_t y1 , y2, width, height = 0 ;
222
222
223
- // ulTaskNotifyTake(pdTRUE, 200);
224
- // Notification is still needed (even if there is a mutex on SPI) because of the DataCommand pin
225
- // which cannot be set/clear during a transfer.
226
-
227
223
// if ((scrollDirection == LittleVgl::FullRefreshDirections::Down) && (area->y2 == visibleNbLines - 1)) {
228
224
// writeOffset = ((writeOffset + totalNbLines) - visibleNbLines) % totalNbLines;
229
225
// } else if ((scrollDirection == FullRefreshDirections::Up) && (area->y1 == 0)) {
@@ -296,7 +292,6 @@ void LittleVgl::FlushDisplay(const lv_area_t* area, lv_color_t* color_p) {
296
292
if (height > 0 ) {
297
293
// lcd.DrawBuffer(area->x1, y1, width, height, reinterpret_cast<const uint8_t*>(color_p), width * height * 2);
298
294
DrawBuffer (&disp_drv, area->x1 , y1 , width, height, reinterpret_cast <uint8_t *>(color_p), width * height * 2 );
299
- // ulTaskNotifyTake(pdTRUE, 100);
300
295
}
301
296
302
297
uint16_t pixOffset = width * height;
@@ -341,13 +336,22 @@ void LittleVgl::SetNewTouchPoint(int16_t x, int16_t y, bool contact) {
341
336
}
342
337
}
343
338
339
+ // Cancel an ongoing tap
340
+ // Signifies that LVGL should not handle the current tap
344
341
void LittleVgl::CancelTap () {
345
342
if (tapped) {
346
343
isCancelled = true ;
347
344
touchPoint = {-1 , -1 };
348
345
}
349
346
}
350
347
348
+ // Clear the current tapped state
349
+ // Signifies that touch input processing is suspended
350
+ void LittleVgl::ClearTouchState () {
351
+ touchPoint = {-1 , -1 };
352
+ tapped = false ;
353
+ }
354
+
351
355
bool LittleVgl::GetTouchPadInfo (lv_indev_data_t * ptr) {
352
356
ptr->point .x = touchPoint.x ;
353
357
ptr->point .y = touchPoint.y ;
0 commit comments