DISPLAY API
Overview
This section mainly describes the API introductions, and related data structures of the DISPLAY API. The DISPLAY API provides functions to control and manage display devices, such as LCD, OLED, and other types of displays.
For detailed information about DISPLAY API, please refer to:
For DISPLAY API example projects, please refer to:
API Reference
Header File
Functions
-
avdk_err_t bk_display_open(bk_display_ctlr_handle_t handle)
Open display controller.
- Parameters
handle – Display controller handle
- Returns
Operation result, AVDK_ERR_OK indicates success
-
avdk_err_t bk_display_close(bk_display_ctlr_handle_t handle)
Close display controller.
- Parameters
handle – Display controller handle
- Returns
Operation result, AVDK_ERR_OK indicates success
-
avdk_err_t bk_display_delete(bk_display_ctlr_handle_t handle)
Delete display controller.
- Parameters
handle – Display controller handle
- Returns
Operation result, AVDK_ERR_OK indicates success
-
avdk_err_t bk_display_flush(bk_display_ctlr_handle_t handle, frame_buffer_t *frame, bk_err_t (*free_t)(void *args))
Flush display content.
- Parameters
handle – Display controller handle
frame – Frame data to be displayed
free_t – Frame data release callback function
- Returns
Operation result, AVDK_ERR_OK indicates success
-
avdk_err_t bk_display_ioctl(bk_display_ctlr_handle_t handle, uint32_t cmd, void *arg)
Control IO operations of display controller.
- Parameters
handle – Display controller handle
cmd – IO control command
param – Command data
- Returns
Operation result, AVDK_ERR_OK indicates success
-
avdk_err_t bk_display_mcu_new(bk_display_ctlr_handle_t *handle, bk_display_mcu_ctlr_config_t *config)
Create MCU display controller.
- Parameters
handle – Output parameter, used to store the created display controller handle
config – MCU display controller configuration parameters
- Returns
Operation result, AVDK_ERR_OK indicates success
-
avdk_err_t bk_display_rgb_new(bk_display_ctlr_handle_t *handle, bk_display_rgb_ctlr_config_t *config)
Create RGB display controller.
- Parameters
handle – Output parameter, used to store the created display controller handle
config – RGB display controller configuration parameters
- Returns
Operation result, AVDK_ERR_OK indicates success
-
avdk_err_t bk_display_spi_new(bk_display_ctlr_handle_t *handle, bk_display_spi_ctlr_config_t *config)
Create SPI display controller.
- Parameters
handle – Output parameter, used to store the created display controller handle
config – SPI display controller configuration parameters
- Returns
Operation result, AVDK_ERR_OK indicates success
-
avdk_err_t bk_display_qspi_new(bk_display_ctlr_handle_t *handle, bk_display_qspi_ctlr_config_t *config)
Create QSPI display controller.
- Parameters
handle – Output parameter, used to store the created display controller handle
config – QSPI display controller configuration parameters
- Returns
Operation result, AVDK_ERR_OK indicates success
-
avdk_err_t bk_display_dual_qspi_new(bk_display_ctlr_handle_t *handle, bk_display_dual_qspi_ctlr_config_t *config)
Create Dual QSPI display controller.
- Parameters
handle – Output parameter, used to store the created display controller handle
config – Dual QSPI display controller configuration parameters
- Returns
Operation result, AVDK_ERR_OK indicates success
-
avdk_err_t bk_display_dual_spi_new(bk_display_ctlr_handle_t *handle, bk_display_dual_spi_ctlr_config_t *config)
Create Dual SPI display controller.
- Parameters
handle – Output parameter, used to store the created display controller handle
config – Dual SPI display controller configuration parameters
- Returns
Operation result, AVDK_ERR_OK indicates success
API Typedefs
Header File
Structures
-
struct bk_display_rgb_ctlr_config_t
RGB display controller configuration structure.
Used to configure LCD display controller with RGB interface, including device name, LCD device information and SPI IO configuration
-
struct bk_display_mcu_ctlr_config_t
MCU display controller configuration structure.
Used to configure LCD display controller with MCU interface, including device name and LCD device information
-
struct bk_display_qspi_ctlr_config_t
-
struct bk_display_spi_ctlr_config_t
-
struct bk_display_dual_qspi_ctlr_config_t
-
struct bk_display_dual_spi_ctlr_config_t
-
struct bk_display_ctlr
Type Definitions
-
typedef struct bk_display_ctlr *bk_display_ctlr_handle_t
Display controller interface structure.
Defines the interface functions that the display controller must implement, including open, close, flush, delete and IO control
-
typedef struct bk_display_ctlr bk_display_ctlr_t