lv_vglite_utils.h

Defines

ENUM_TO_STRING(e)

Copyright 2022-2024 NXP

SPDX-License-Identifier: MIT

VGLITE_ASSERT(expr)
VGLITE_ASSERT_MSG(expr, msg)
VGLITE_CHECK_ERROR(function)

Functions

static inline void vglite_set_scissor(const lv_area_t *clip_area)

Set the clipping box.

Parameters:

clip_area -- [in] Clip area with relative coordinates of destination buffer

const char *vglite_error_to_string(vg_lite_error_t error)
void vglite_run(void)

Flush command to VG-Lite.

vg_lite_color_t vglite_get_color(lv_color32_t lv_col32, bool gradient)

Get vglite color. Premultiplies (if not hw already) and swizzles the given LVGL 32bit color to obtain vglite color.

Parameters:
  • lv_col32 -- [in] The initial LVGL 32bit color

  • gradient -- [in] True for gradient color

Return values:

The -- vglite 32-bit color value:

vg_lite_blend_t vglite_get_blend_mode(lv_blend_mode_t lv_blend_mode)

Get vglite blend mode.

Parameters:

lv_blend_mode -- [in] The LVGL blend mode

Return values:

The -- vglite blend mode

vg_lite_buffer_format_t vglite_get_buf_format(lv_color_format_t cf)

Get vglite buffer format.

Parameters:

cf -- [in] Color format

Return values:

The -- vglite buffer format

uint8_t vglite_get_alignment(lv_color_format_t cf)

Get vglite buffer alignment.

Parameters:

cf -- [in] Color format

Return values:

Alignment -- requirement in bytes

bool vglite_buf_aligned(const void *buf, uint32_t stride, lv_color_format_t cf)

Check memory and stride alignment.

Parameters:
  • buf -- [in] Buffer address

  • stride -- [in] Stride of buffer in bytes

  • cf -- [in] Color format - to calculate the expected alignment

Return values:

true -- Alignment OK