mirror of
https://github.com/lvgl/lvgl.git
synced 2024-11-25 10:43:54 +08:00
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:
parent
afd410c1de
commit
5e0d063086
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user