xiaoxiang781216 commented on code in PR #3659:
URL: https://github.com/apache/nuttx-apps/pull/3659#discussion_r3789534722


##########
examples/lvgltouch/lvgltouch_main.c:
##########
@@ -0,0 +1,136 @@
+/****************************************************************************
+ * apps/examples/lvgltouch/lvgltouch_main.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <lvgl/lvgl.h>
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static FAR lv_indev_t *g_touch;
+static FAR lv_obj_t *g_status;
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+static void lvgltouch_update(FAR lv_timer_t *timer)
+{
+  lv_indev_state_t state;
+  lv_point_t point;
+  char text[64];
+
+  UNUSED(timer);
+
+  state = lv_indev_get_state(g_touch);
+  lv_indev_get_point(g_touch, &point);
+  snprintf(text, sizeof(text), "state: %s\nx: %d  y: %d",
+           state == LV_INDEV_STATE_PRESSED ? "pressed" : "released",
+           (int)point.x, (int)point.y);

Review Comment:
   remove the cast



##########
examples/lvgltouch/Kconfig:
##########
@@ -0,0 +1,36 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config EXAMPLES_LVGLTOUCH
+       tristate "LVGL touchscreen diagnostic"
+       default n
+       depends on GRAPHICS_LVGL && INPUT_TOUCHSCREEN
+       ---help---
+               Show the touchscreen state and coordinates on the display.
+
+if EXAMPLES_LVGLTOUCH
+
+config EXAMPLES_LVGLTOUCH_PROGNAME
+       string "Program name"
+       default "lvgltouch"
+
+config EXAMPLES_LVGLTOUCH_PRIORITY
+       int "Task priority"
+       default 100
+
+config EXAMPLES_LVGLTOUCH_STACKSIZE
+       int "Stack size"
+       default 8192
+
+config EXAMPLES_LVGLTOUCH_INPUT_DEVPATH
+       string "Touchscreen device path"
+       default "/dev/input0"
+
+config EXAMPLES_LVGLTOUCH_FBDEVPATH

Review Comment:
   ```suggestion
   config EXAMPLES_LVGLTOUCH_FB_DEVPATH
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to