lv_ll.h

API reference for lv_ll.h

Report on GitHub

Handle linked lists. The nodes are dynamically allocated by the 'lv_mem' module.

Functions

lv_ll_get_head

Return with head node of the linked list

 
void * lv_ll_get_head(const lv_ll_t *ll_p)
Parameters
NameTypeDescription
ll_pconst lv_ll_t *pointer to linked list

Returns: void * — pointer to the head of 'll_p'

lv_ll_get_tail

Return with tail node of the linked list

 
void * lv_ll_get_tail(const lv_ll_t *ll_p)
Parameters
NameTypeDescription
ll_pconst lv_ll_t *pointer to linked list

Returns: void * — pointer to the tail of 'll_p'

lv_ll_get_next

Return with the pointer of the next node after 'n_act'

 
void * lv_ll_get_next(const lv_ll_t *ll_p, const void *n_act)
Parameters
NameTypeDescription
ll_pconst lv_ll_t *pointer to linked list
n_actconst void *pointer a node

Returns: void * — pointer to the next node

lv_ll_get_prev

Return with the pointer of the previous node after 'n_act'

 
void * lv_ll_get_prev(const lv_ll_t *ll_p, const void *n_act)
Parameters
NameTypeDescription
ll_pconst lv_ll_t *pointer to linked list
n_actconst void *pointer a node

Returns: void * — pointer to the previous node

lv_ll_get_len

Return the length of the linked list.

 
uint32_t lv_ll_get_len(const lv_ll_t *ll_p)
Parameters
NameTypeDescription
ll_pconst lv_ll_t *pointer to linked list

Returns: uint32_t — length of the linked list

Structs

struct

lv_ll_t

Description of a linked list

MemberTypeDescription
n_sizeuint32_t
headlv_ll_node_t *
taillv_ll_node_t *
Used by 17 functions
  • lv_vector_for_each_destroy_tasks — param task_list
  • lv_ll_init — param ll_p
  • lv_ll_ins_head — param ll_p
  • lv_ll_ins_prev — param ll_p
  • lv_ll_ins_tail — param ll_p
  • lv_ll_remove — param ll_p
  • lv_ll_clear_custom — param ll_p
  • lv_ll_clear — param ll_p
  • lv_ll_chg_list — param ll_ori_p
  • lv_ll_chg_list — param ll_new_p
  • lv_ll_get_head — param ll_p
  • lv_ll_get_tail — param ll_p
  • lv_ll_get_next — param ll_p
  • lv_ll_get_prev — param ll_p
  • lv_ll_get_len — param ll_p
  • lv_ll_move_before — param ll_p
  • lv_ll_is_empty — param ll_p

Typedefs

lv_ll_node_t

 
typedef uint8_t lv_ll_node_t

Dummy type to make handling easier

Macros

LV_LL_READ

 
#define LV_LL_READ(list, i) \
    for(i = lv_ll_get_head(list); i != NULL; i = lv_ll_get_next(list, i))

LV_LL_READ_BACK

 
#define LV_LL_READ_BACK(list, i) \
    for(i = lv_ll_get_tail(list); i != NULL; i = lv_ll_get_prev(list, i))

Dependencies

How is this guide?

Last updated on

On this page