You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/10/08 21:16:00 UTC

[GitHub] [incubator-nuttx-apps] pkarashchenko commented on a diff in pull request #1341: LVGL v8 upgrade

pkarashchenko commented on code in PR #1341:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1341#discussion_r990695403


##########
examples/lvgldemo/lvgldemo.c:
##########
@@ -62,46 +57,99 @@
 #  define NEED_BOARDINIT 1
 #endif
 
-#define DISPLAY_BUFFER_SIZE (CONFIG_LV_HOR_RES * \
-                              CONFIG_EXAMPLES_LVGLDEMO_BUFF_SIZE)
+/****************************************************************************
+ * Private Type Declarations
+ ****************************************************************************/
+
+typedef void (*demo_create_func_t)(void);

Review Comment:
   ```suggestion
   typedef CODE void (*demo_create_func_t)(void);
   ```



##########
graphics/lvgl/lv_porting/lv_fbdev_interface.h:
##########
@@ -0,0 +1,81 @@
+/****************************************************************************
+ * apps/graphics/lvgl/lv_porting/lv_fbdev_interface.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __LV_FBDEV_INTERFACE_H__
+#define __LV_FBDEV_INTERFACE_H__
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <lvgl/lvgl.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#if defined(CONFIG_LV_USE_FBDEV_INTERFACE)
+
+/****************************************************************************
+ * Type Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: lv_fbdev_interface_init
+ *
+ * Description:
+ *   Framebuffer device interface initialization.
+ *
+ * Input Parameters:
+ *   dev_path - Framebuffer device path, set to NULL to use the default path.
+ *
+ * Returned Value:
+ *   lv_disp object address on success; NULL on failure.
+ *
+ ****************************************************************************/
+
+FAR lv_disp_t *lv_fbdev_interface_init(FAR const char *dev_path,
+                                       int line_buf);
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CONFIG_LV_USE_FBDEV_INTERFACE */
+
+#endif /* __LV_FBDEV_INTERFACE_H__ */

Review Comment:
   ```suggestion
   #endif /* __APPS_GRAPHICS_LVGL_LV_PORTING_LV_FBDEV_INTERFACE_H */
   ```



##########
graphics/lvgl/lv_porting/lv_lcddev_interface.h:
##########
@@ -0,0 +1,82 @@
+/****************************************************************************
+ * apps/graphics/lvgl/lv_porting/lv_lcddev_interface.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __LV_LCDDEV_INTERFACE_H__
+#define __LV_LCDDEV_INTERFACE_H__
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <lvgl/lvgl.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#if defined(CONFIG_LV_USE_LCDDEV_INTERFACE)
+
+/****************************************************************************
+ * Type Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: lv_lcddev_interface_init
+ *
+ * Description:
+ *   lcddev interface initialization.
+ *
+ * Input Parameters:
+ *   dev_path - lcd device path, set to NULL to use the default path
+ *   line_buf - Number of line buffers,
+ *              set to 0 to use the default line buffer
+ *
+ * Returned Value:
+ *   lv_disp object address on success; NULL on failure.
+ *
+ ****************************************************************************/
+
+lv_disp_t *lv_lcddev_interface_init(const char *dev_path, int line_buf);
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CONFIG_LV_USE_LCDDEV_INTERFACE */
+
+#endif /* __LV_LCDDEV_INTERFACE_H__ */

Review Comment:
   ```suggestion
   #endif /* __APPS_GRAPHICS_LVGL_LV_PORTING_LV_LCDDEV_INTERFACE_H */
   ```



##########
graphics/lvgl/lv_porting/lv_encoder_interface.h:
##########
@@ -0,0 +1,80 @@
+/****************************************************************************
+ * apps/graphics/lvgl/lv_porting/lv_encoder_interface.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __LV_ENCODER_INTERFACE_H__
+#define __LV_ENCODER_INTERFACE_H__
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <lvgl/lvgl.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#if defined(CONFIG_LV_USE_ENCODER_INTERFACE)
+
+/****************************************************************************
+ * Type Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: lv_encoder_interface_init
+ *
+ * Description:
+ *   Encoder interface initialization.
+ *
+ * Input Parameters:
+ *   dev_path - input device path, set to NULL to use the default path.
+ *
+ * Returned Value:
+ *   lv_indev object address on success; NULL on failure.
+ *
+ ****************************************************************************/
+
+lv_indev_t *lv_encoder_interface_init(const char *dev_path);
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CONFIG_LV_USE_ENCODER_INTERFACE */
+
+#endif /* __LV_ENCODER_INTERFACE_H__ */

Review Comment:
   ```suggestion
   #endif /* __APPS_GRAPHICS_LVGL_LV_PORTING_LV_ENCODER_INTERFACE_H */
   ```



##########
graphics/lvgl/lv_porting/lv_button_interface.h:
##########
@@ -0,0 +1,80 @@
+/****************************************************************************
+ * apps/graphics/lvgl/lv_porting/lv_button_interface.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __LV_BUTTON_INTERFACE_H__
+#define __LV_BUTTON_INTERFACE_H__
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <lvgl/lvgl.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#if defined(CONFIG_LV_USE_BUTTON_INTERFACE)
+
+/****************************************************************************
+ * Type Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: lv_button_interface_init
+ *
+ * Description:
+ *   Button interface initialization.
+ *
+ * Input Parameters:
+ *   dev_path - input device path, set to NULL to use the default path
+ *
+ * Returned Value:
+ *   lv_indev object address on success; NULL on failure.
+ *
+ ****************************************************************************/
+
+lv_indev_t *lv_button_interface_init(const char *dev_path);
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CONFIG_LV_USE_BUTTON_INTERFACE */
+
+#endif /* __LV_BUTTON_INTERFACE_H__ */

Review Comment:
   ```suggestion
   #endif /* __APPS_GRAPHICS_LVGL_LV_PORTING_LV_BUTTON_INTERFACE_H */
   ```



##########
graphics/lvgl/lv_porting/lv_button_interface.h:
##########
@@ -0,0 +1,80 @@
+/****************************************************************************
+ * apps/graphics/lvgl/lv_porting/lv_button_interface.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __LV_BUTTON_INTERFACE_H__
+#define __LV_BUTTON_INTERFACE_H__

Review Comment:
   ```suggestion
   #ifndef __APPS_GRAPHICS_LVGL_LV_PORTING_LV_BUTTON_INTERFACE_H
   #define __APPS_GRAPHICS_LVGL_LV_PORTING_LV_BUTTON_INTERFACE_H
   ```



##########
graphics/lvgl/lv_porting/lv_keypad_interface.h:
##########
@@ -18,36 +18,59 @@
  *
  ****************************************************************************/
 
-#ifndef __APPS_EXAMPLES_LVGLDEMO_TP_CAL_H
-#define __APPS_EXAMPLES_LVGLDEMO_TP_CAL_H
+#ifndef __LV_KEYPAD_INTERFACE_H__
+#define __LV_KEYPAD_INTERFACE_H__
 
 /****************************************************************************
- * Public Function Prototypes
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <lvgl/lvgl.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#if defined(CONFIG_LV_USE_KEYPAD_INTERFACE)
+
+/****************************************************************************
+ * Type Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Data
  ****************************************************************************/
 
 #ifdef __cplusplus
+#define EXTERN extern "C"
 extern "C"
 {
+#else
+#define EXTERN extern
 #endif
 
 /****************************************************************************
- * Name: tp_cal_create
+ * Name: lv_keypad_interface_init
  *
  * Description:
- *   Create a touchpad calibration screen
+ *   Keypad interface initialization.
  *
  * Input Parameters:
- *   None
+ *   dev_path - input device path, set to NULL to use the default path
  *
  * Returned Value:
- *   None
+ *   lv_indev object address on success; NULL on failure.
  *
  ****************************************************************************/
 
-void tp_cal_create(void);
+lv_indev_t *lv_keypad_interface_init(const char *dev_path);
 
+#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* __APPS_EXAMPLES_LVGLDEMO_TP_CAL_H */
+#endif /* CONFIG_LV_USE_KEYPAD_INTERFACE */
+
+#endif /* __LV_KEYPAD_INTERFACE_H__ */

Review Comment:
   ```suggestion
   #endif /* __APPS_GRAPHICS_LVGL_LV_PORTING_LV_KEYPAD_INTERFACE_H */
   ```



##########
graphics/lvgl/lv_porting/lv_porting.h:
##########
@@ -0,0 +1,76 @@
+/****************************************************************************
+ * apps/graphics/lvgl/lv_porting/lv_porting.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __LV_PORTING_H__
+#define __LV_PORTING_H__
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <lv_porting/lv_button_interface.h>
+#include <lv_porting/lv_encoder_interface.h>
+#include <lv_porting/lv_fbdev_interface.h>
+#include <lv_porting/lv_lcddev_interface.h>
+#include <lv_porting/lv_mem_interface.h>
+#include <lv_porting/lv_keypad_interface.h>
+#include <lv_porting/lv_syslog_interface.h>
+#include <lv_porting/lv_touchpad_interface.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Type Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: lv_porting_init
+ *
+ * Description:
+ *   Initialize all porting.
+ *
+ ****************************************************************************/
+
+void lv_porting_init(void);
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __LV_PORTING_H__ */

Review Comment:
   ```suggestion
   #endif /* __APPS_GRAPHICS_LVGL_LV_PORTING_LV_PORTING_H */
   ```



##########
graphics/lvgl/lv_porting/lv_keypad_interface.h:
##########
@@ -18,36 +18,59 @@
  *
  ****************************************************************************/
 
-#ifndef __APPS_EXAMPLES_LVGLDEMO_TP_CAL_H
-#define __APPS_EXAMPLES_LVGLDEMO_TP_CAL_H
+#ifndef __LV_KEYPAD_INTERFACE_H__
+#define __LV_KEYPAD_INTERFACE_H__

Review Comment:
   ```suggestion
   #ifndef __APPS_GRAPHICS_LVGL_LV_PORTING_LV_KEYPAD_INTERFACE_H
   #define __APPS_GRAPHICS_LVGL_LV_PORTING_LV_KEYPAD_INTERFACE_H
   ```



##########
graphics/lvgl/lv_porting/lv_lcddev_interface.h:
##########
@@ -0,0 +1,82 @@
+/****************************************************************************
+ * apps/graphics/lvgl/lv_porting/lv_lcddev_interface.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __LV_LCDDEV_INTERFACE_H__
+#define __LV_LCDDEV_INTERFACE_H__

Review Comment:
   ```suggestion
   #ifndef __APPS_GRAPHICS_LVGL_LV_PORTING_LV_LCDDEV_INTERFACE_H
   #define __APPS_GRAPHICS_LVGL_LV_PORTING_LV_LCDDEV_INTERFACE_H
   ```



##########
graphics/lvgl/lv_porting/lv_syslog_interface.h:
##########
@@ -18,21 +18,20 @@
  *
  ****************************************************************************/
 
-#ifndef __APPS_GRAPHICS_LVGL_LV_FS_INTERFACE_H
-#define __APPS_GRAPHICS_LVGL_LV_FS_INTERFACE_H
+#ifndef __LV_SYSLOG_INTERFACE_H__
+#define __LV_SYSLOG_INTERFACE_H__

Review Comment:
   ```suggestion
   #ifndef __APPS_GRAPHICS_LVGL_LV_PORTING_LV_SYSLOG_INTERFACE_H
   #define __APPS_GRAPHICS_LVGL_LV_PORTING_LV_SYSLOG_INTERFACE_H
   ```



##########
graphics/lvgl/lv_porting/lv_encoder_interface.h:
##########
@@ -0,0 +1,80 @@
+/****************************************************************************
+ * apps/graphics/lvgl/lv_porting/lv_encoder_interface.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __LV_ENCODER_INTERFACE_H__
+#define __LV_ENCODER_INTERFACE_H__

Review Comment:
   ```suggestion
   #ifndef __APPS_GRAPHICS_LVGL_LV_PORTING_LV_ENCODER_INTERFACE_H
   #define __APPS_GRAPHICS_LVGL_LV_PORTING_LV_ENCODER_INTERFACE_H
   ```



##########
graphics/lvgl/lv_porting/lv_fbdev_interface.h:
##########
@@ -0,0 +1,81 @@
+/****************************************************************************
+ * apps/graphics/lvgl/lv_porting/lv_fbdev_interface.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __LV_FBDEV_INTERFACE_H__
+#define __LV_FBDEV_INTERFACE_H__

Review Comment:
   ```suggestion
   #ifndef __APPS_GRAPHICS_LVGL_LV_PORTING_LV_FBDEV_INTERFACE_H
   #define __APPS_GRAPHICS_LVGL_LV_PORTING_LV_FBDEV_INTERFACE_H
   ```



##########
graphics/lvgl/lv_porting/lv_syslog_interface.h:
##########
@@ -54,13 +53,21 @@ extern "C"
  * Public Function Prototypes
  ****************************************************************************/
 
-void lv_fs_interface_init(void);
+/****************************************************************************
+ * Name: lv_syslog_interface_init
+ *
+ * Description:
+ *   Syslog interface initialization.
+ *
+ ****************************************************************************/
+
+void lv_syslog_interface_init(void);
 
 #undef EXTERN
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* LV_USE_FILESYSTEM */
+#endif /* CONFIG_LV_USE_SYSLOG_INTERFACE */
 
-#endif /* __APPS_GRAPHICS_LVGL_LV_FS_INTERFACE_H */
+#endif /* __LV_PORTING_H__ */

Review Comment:
   ```suggestion
   #endif /* __APPS_GRAPHICS_LVGL_LV_PORTING_LV_SYSLOG_INTERFACE_H */
   ```



##########
graphics/lvgl/lv_porting/lv_porting.h:
##########
@@ -0,0 +1,76 @@
+/****************************************************************************
+ * apps/graphics/lvgl/lv_porting/lv_porting.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __LV_PORTING_H__
+#define __LV_PORTING_H__

Review Comment:
   ```suggestion
   #ifndef __APPS_GRAPHICS_LVGL_LV_PORTING_LV_PORTING_H
   #define __APPS_GRAPHICS_LVGL_LV_PORTING_LV_PORTING_H
   ```



##########
graphics/lvgl/lv_porting/lv_mem_interface.h:
##########
@@ -0,0 +1,96 @@
+/****************************************************************************
+ * apps/graphics/lvgl/lv_porting/lv_mem_interface.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __LV_MEM_INTERFACE_H__
+#define __LV_MEM_INTERFACE_H__
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <lvgl/lvgl.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#ifndef CONFIG_LV_MEM_INTERFACE_CUSTOM_SIZE
+#define CONFIG_LV_MEM_INTERFACE_CUSTOM_SIZE 0
+#endif
+
+#ifndef CONFIG_LV_MEM_INTERFACE_CUSTOM_NAME
+#define CONFIG_LV_MEM_INTERFACE_CUSTOM_NAME ""
+#endif
+
+#if CONFIG_LV_MEM_INTERFACE_CUSTOM_SIZE
+
+/****************************************************************************
+ * Type Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: lv_mem_custom_alloc
+ ****************************************************************************/
+
+FAR void *lv_mem_custom_alloc(size_t size);
+
+/****************************************************************************
+ * Name: lv_mem_custom_free
+ ****************************************************************************/
+
+void lv_mem_custom_free(FAR void *mem);
+
+/****************************************************************************
+ * Name: lv_mem_custom_realloc
+ ****************************************************************************/
+
+FAR void *lv_mem_custom_realloc(FAR void *oldmem, size_t size);
+
+/****************************************************************************
+ * Name: lv_mem_custom_memalign
+ ****************************************************************************/
+
+FAR void *lv_mem_custom_memalign(size_t alignment, size_t size);
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CONFIG_LV_MEM_INTERFACE_CUSTOM_SIZE */
+
+#endif /* __LV_MEM_INTERFACE_H__ */

Review Comment:
   ```suggestion
   #endif /* __APPS_GRAPHICS_LVGL_LV_PORTING_LV_MEM_INTERFACE_H */
   ```



##########
graphics/lvgl/lv_porting/lv_mem_interface.h:
##########
@@ -0,0 +1,96 @@
+/****************************************************************************
+ * apps/graphics/lvgl/lv_porting/lv_mem_interface.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __LV_MEM_INTERFACE_H__
+#define __LV_MEM_INTERFACE_H__

Review Comment:
   ```suggestion
   #ifndef __APPS_GRAPHICS_LVGL_LV_PORTING_LV_MEM_INTERFACE_H
   #define __APPS_GRAPHICS_LVGL_LV_PORTING_LV_MEM_INTERFACE_H
   ```



##########
graphics/lvgl/lv_porting/lv_encoder_interface.h:
##########
@@ -0,0 +1,80 @@
+/****************************************************************************
+ * apps/graphics/lvgl/lv_porting/lv_encoder_interface.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __LV_ENCODER_INTERFACE_H__
+#define __LV_ENCODER_INTERFACE_H__
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <lvgl/lvgl.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#if defined(CONFIG_LV_USE_ENCODER_INTERFACE)
+
+/****************************************************************************
+ * Type Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: lv_encoder_interface_init
+ *
+ * Description:
+ *   Encoder interface initialization.
+ *
+ * Input Parameters:
+ *   dev_path - input device path, set to NULL to use the default path.
+ *
+ * Returned Value:
+ *   lv_indev object address on success; NULL on failure.
+ *
+ ****************************************************************************/
+
+lv_indev_t *lv_encoder_interface_init(const char *dev_path);

Review Comment:
   ```suggestion
   FAR lv_indev_t *lv_encoder_interface_init(FAR const char *dev_path);
   ```



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org