diff --git a/src/dev/nuttx/lv_nuttx_entry.c b/src/dev/nuttx/lv_nuttx_entry.c index 4fda074b45..844e67736c 100644 --- a/src/dev/nuttx/lv_nuttx_entry.c +++ b/src/dev/nuttx/lv_nuttx_entry.c @@ -79,7 +79,14 @@ lv_global_t * lv_global_default(void) } #endif -lv_display_t * lv_nuttx_init(lv_nuttx_t * info) +void lv_nuttx_info_init(lv_nuttx_t * info) +{ + lv_memzero(info, sizeof(lv_nuttx_t)); + info->fb_path = "/dev/fb0"; + info->input_path = "/dev/input0"; +} + +lv_display_t * lv_nuttx_init(const lv_nuttx_t * info) { lv_display_t * disp = NULL; diff --git a/src/dev/nuttx/lv_nuttx_entry.h b/src/dev/nuttx/lv_nuttx_entry.h index 302a0e7a06..9377f2fb66 100644 --- a/src/dev/nuttx/lv_nuttx_entry.h +++ b/src/dev/nuttx/lv_nuttx_entry.h @@ -40,11 +40,27 @@ typedef struct { * GLOBAL PROTOTYPES **********************/ -lv_display_t * lv_nuttx_init(lv_nuttx_t * info); +/** + * Initialize the lv_nuttx_t structure with default values for the NuttX port of LVGL. + * @param info Pointer to the lv_nuttx_t structure to be initialized. + */ +void lv_nuttx_info_init(lv_nuttx_t * info); + +/** + * Initialize the LVGL display driver for NuttX using the provided configuration information. + * @param info Pointer to the lv_nuttx_t structure containing the configuration information for the display driver. + * @return Pointer to the lv_display_t structure representing the initialized display driver. + */ +lv_display_t * lv_nuttx_init(const lv_nuttx_t * info); #if LV_USE_NUTTX_CUSTOM_INIT -lv_display_t * lv_nuttx_init_custom(lv_nuttx_t * info); -#endif +/** + * Initialize the LVGL display driver for NuttX using the provided custom configuration information. + * @param info Pointer to the lv_nuttx_t structure containing the custom configuration information for the display driver. + * @return Pointer to the lv_display_t structure representing the initialized display driver. + */ +lv_display_t * lv_nuttx_init_custom(const lv_nuttx_t * info); +#endif /* LV_USE_NUTTX_CUSTOM_INIT */ /********************** * MACROS