feat(nuttx): add structure default initialization (#4651)

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
_VIFEXTech 2023-10-12 05:51:08 +08:00 committed by GitHub
parent afd410c1de
commit 5e0d063086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 4 deletions

View File

@ -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;

View File

@ -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