lv_utils.h
API reference for lv_utils.h
Summary
Functions
misc/lv_utils.h:49function
lv_utils_bsearch
Searches base[0] to base[n - 1] for an item that matches *key.
void * lv_utils_bsearch(const void *key, const void *base, size_t n, size_t size, int(*cmp)(const void *pRef, const void *pElement))| Name | Type | Description |
|---|---|---|
key | const void * | Pointer to item being searched for |
base | const void * | Pointer to first element to search |
n | size_t | Number of elements |
size | size_t | Size of each element |
cmp | int(*)(const void *pRef, const void *pElement) | Pointer to comparison function (see unicode_list_compare() as a comparison function example) |
Returns: void * — a pointer to a matching item, or NULL if none exists.
The function cmp must return negative if it's first argument (the search key) is less that it's second (a table entry), zero if equal, and positive if greater.
Items in the array must be in ascending order.
misc/lv_utils.h:58function
lv_draw_buf_save_to_file
Save a draw buf to a file
lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t *draw_buf, const char *path)| Name | Type | Description |
|---|---|---|
draw_buf | const lv_draw_buf_t * | pointer to a draw buffer |
path | const char * | path to the file to save |
Returns: lv_result_t — LV_RESULT_OK: success; LV_RESULT_INVALID: error
misc/lv_utils.h:65function
lv_swap_bytes_32
Reverse the order of the bytes in a 32-bit value.
static uint32_t lv_swap_bytes_32(uint32_t x)| Name | Type | Description |
|---|---|---|
x | uint32_t | a 32-bit value. |
Returns: uint32_t — the value x with reversed byte-order.
misc/lv_utils.h:78function
lv_swap_bytes_16
Reverse the order of the bytes in a 16-bit value.
static uint16_t lv_swap_bytes_16(uint16_t x)| Name | Type | Description |
|---|---|---|
x | uint16_t | a 16-bit value. |
Returns: uint16_t — the value x with reversed byte-order.
Dependencies
How is this guide?
Last updated on