lv_linux_drm.h
API reference for lv_linux_drm.h
Summary
Functions
lv_linux_drm_set_file
Configure the DRM device file and connector for a display.
Sets the DRM device file path and connector ID to use for the specified display. The DRM device file is typically located at /dev/dri/cardN where N is the card number. The connector ID specifies which physical output (HDMI, VGA, etc.) to use.
lv_result_t lv_linux_drm_set_file(lv_display_t *disp, const char *file, int64_t connector_id)| Name | Type | Description |
|---|---|---|
disp | lv_display_t * | Pointer to the display object created with lv_linux_drm_create() |
file | const char * | Path to the DRM device file (e.g., "/dev/dri/card0") |
connector_id | int64_t | ID of the DRM connector to use, or -1 to auto-select the first available |
Returns: lv_result_t — LV_RESULT_OK if the initialization succeeded or LV_RESULT_INVALID if it failed
lv_linux_drm_set_mode_cb
Set a callback function for custom DRM mode selection to override the default mode selection behavior
The default mode selection behavior is selecting the native mode
void lv_linux_drm_set_mode_cb(lv_display_t *disp, lv_linux_drm_select_mode_cb_t callback)| Name | Type | Description |
|---|---|---|
disp | lv_display_t * | pointer to the display object |
callback | lv_linux_drm_select_mode_cb_t | function to be called when a display mode needs to be selected, or NULL to use the default mode selection behavior |
Typedefs
lv_linux_drm_mode_t
typedef drmModeModeInfo lv_linux_drm_mode_tUsed by 4 functions
lv_linux_drm_mode_get_horizontal_resolution— parammodelv_linux_drm_mode_get_vertical_resolution— parammodelv_linux_drm_mode_get_refresh_rate— parammodelv_linux_drm_mode_is_preferred— parammode
lv_linux_drm_select_mode_cb_t
typedef size_t(* lv_linux_drm_select_mode_cb_t) (lv_display_t *disp, const lv_linux_drm_mode_t *modes, size_t mode_count)Callback function type for selecting a DRM display mode
Used by 1 function
lv_linux_drm_set_mode_cb— paramcallback
Dependencies
How is this guide?
Last updated on