DRAW OSD API
Overview
For detailed information about DMA2D, please refer to:
For DRAW OSD example projects, please refer to:
API Reference
Header File
Functions
-
avdk_err_t bk_draw_osd_array(bk_draw_osd_ctlr_handle_t handle, osd_bg_info_t *bg_info, const blend_info_t *info)
draw osd array
- Parameters
handle – osd controller handle
bg_info – osd background info
info – osd info
- Returns
avdk_err_t
-
avdk_err_t bk_draw_osd_image(bk_draw_osd_ctlr_handle_t handle, osd_bg_info_t *bg_info, const blend_info_t *info)
draw osd image
draw osd image
- Parameters
handle – osd controller handle
bg_info – osd background info
info – osd info
handle – osd controller handle
bg_info – osd background info
info – osd info
- Returns
avdk_err_t
- Returns
avdk_err_t
-
avdk_err_t bk_draw_osd_font(bk_draw_osd_ctlr_handle_t handle, osd_bg_info_t *bg_info, const blend_info_t *info)
draw osd font
- Parameters
handle – osd controller handle
bg_info – osd background info
info – osd info
- Returns
avdk_err_t
-
avdk_err_t bk_draw_osd_add_or_updata(bk_draw_osd_ctlr_handle_t handle, const char *name, const char *content)
add or updata osd info
- Parameters
handle – osd controller handle
name – osd name
content – osd content
- Returns
avdk_err_t
-
avdk_err_t bk_draw_osd_ioctl(bk_draw_osd_ctlr_handle_t handle, uint32_t ioctl_cmd, uint32_t param1, uint32_t param2, uint32_t param3)
osd controller ioctl
- Parameters
handle – osd controller handle
ioctl_cmd – ioctl command
param1 – ioctl param1
param2 – ioctl param2
param3 – ioctl param3
- Returns
avdk_err_t
-
avdk_err_t bk_draw_osd_delete(bk_draw_osd_ctlr_handle_t handle)
delete osd controller
- Parameters
handle – osd controller handle
- Returns
avdk_err_t
-
avdk_err_t bk_draw_osd_new(bk_draw_osd_ctlr_handle_t *handle, osd_ctlr_config_t *config)
create osd controller
- Parameters
handle – osd controller handle
config – osd controller config
- Returns
avdk_err_t
-
avdk_err_t bk_draw_osd_remove(bk_draw_osd_ctlr_handle_t handle, const char *name)
remove osd info
- Parameters
handle – osd controller handle
name – osd name
- Returns
avdk_err_t
API Typedefs
Header File
Structures
-
struct blend_image_t
-
struct blend_font_t
-
struct bk_blend_t
Public Members
-
uint8_t version
version
-
blend_type_t blend_type
0: image, 1:font
-
const char name[MAX_BLEND_NAME_LEN]
image name like “wifi”,”clock”, “weather”
-
uint32_t width
icon width
-
uint32_t height
icon height
-
uint32_t icon_width
icon width
-
uint32_t icon_height
icon height
-
uint32_t bg_width
background window width
-
uint32_t bg_height
background window height
-
uint16_t xpos
icon x pos based on background window
-
uint16_t ypos
icon y pos based on background window
-
uint8_t version
-
struct blend_info_t
Public Members
-
char name[MAX_BLEND_NAME_LEN]
name like “wifi”,”clock”, “weather”
-
const bk_blend_t *addr
the pointer, pointer to the struct
-
char content[MAX_BLEND_CONTENT_LEN]
content like “wifi0”, “12:00”,”v 1.0.0”
-
char name[MAX_BLEND_NAME_LEN]
-
struct dynamic_array_t
Public Members
-
blend_info_t *entry
the pointer, pointer to the struct array
-
size_t size
the size of the struct array
-
size_t capacity
the capacity of the struct array
-
blend_info_t *entry
-
struct osd_ctlr_config_t
Public Members
-
const blend_info_t *blend_assets
the pointer, pointer to the struct all blend assetsarray
-
const blend_info_t *blend_info
the pointer, pointer to current blend info
-
bool draw_in_psram
true: use PSRAM, false: use SRAM
-
const blend_info_t *blend_assets
-
struct osd_bg_info_t
-
struct bk_draw_osd_ctlr
Macros
-
MAX_BLEND_NAME_LEN
-
MAX_BLEND_CONTENT_LEN
Type Definitions
-
typedef struct bk_draw_osd_ctlr *bk_draw_osd_ctlr_handle_t
-
typedef struct bk_draw_osd_ctlr bk_draw_osd_ctlr_t