|
px-fwlib 0.10.0
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers generated with Doxygen 1.9.2
|
A double (forward and backward) linked list using pointers.
File(s):
Example:
Data Structures | |
| struct | px_link_list_item_t |
| Link structure that must be at the head of each item in the list. More... | |
| struct | px_link_list_t |
| Linked list structure. More... | |
| struct px_link_list_item_t |
Link structure that must be at the head of each item in the list.
Definition at line 69 of file px_link_list.h.
| Data Fields | ||
|---|---|---|
| struct px_link_list_item_s * | next | Pointer to next item in the list. |
| struct px_link_list_item_s * | prev | Pointer to previous item in the list. |
| struct px_link_list_t |
Linked list structure.
Definition at line 76 of file px_link_list.h.
| void px_link_list_init | ( | px_link_list_t * | list, |
| size_t | max_nr_of_items | ||
| ) |
Initialises a linked list structure.
| list | Pointer to the linked list |
| max_nr_of_items | Maximum number of items allowed in list; 0 means no limit |
Definition at line 37 of file px_link_list.c.
| void px_link_list_item_init | ( | px_link_list_t * | list, |
| px_link_list_item_t * | item | ||
| ) |
Initialises a list item.
Initialises the item structure to indicate that it is not in the list.
| list | Pointer to the linked list |
| item | Pointer to specified item |
Definition at line 46 of file px_link_list.c.
| bool px_link_list_is_empty | ( | px_link_list_t * | list | ) |
See if the list is empty.
| list | Pointer to the linked list |
Definition at line 53 of file px_link_list.c.
| bool px_link_list_is_full | ( | px_link_list_t * | list | ) |
See if the list is full.
| list | Pointer to the linked list |
| true | The list is full |
| false | The list is not full, or there is no limit (max_nr_of_items = 0) |
Definition at line 65 of file px_link_list.c.
| size_t px_link_list_get_item_count | ( | px_link_list_t * | list | ) |
Get the number of items in the list.
| list | Pointer to the linked list |
Definition at line 82 of file px_link_list.c.
| px_link_list_item_t * px_link_list_get_item_first | ( | px_link_list_t * | list | ) |
Get a pointer to the first item in the list.
| list | Pointer to the linked list |
Definition at line 87 of file px_link_list.c.
| px_link_list_item_t * px_link_list_get_item_last | ( | px_link_list_t * | list | ) |
Get a pointer to the last item in the list.
| list | Pointer to the linked list |
Definition at line 92 of file px_link_list.c.
| px_link_list_item_t * px_link_list_get_item_next | ( | px_link_list_t * | list, |
| px_link_list_item_t * | item | ||
| ) |
Get a pointer to the next item in the list (after the specified item).
| list | Pointer to the linked list |
| item | Current item |
Definition at line 97 of file px_link_list.c.
| px_link_list_item_t * px_link_list_get_item_prev | ( | px_link_list_t * | list, |
| px_link_list_item_t * | item | ||
| ) |
Get a pointer to the previous item in the list (before the specified item).
| list | Pointer to the linked list |
| item | Current item |
Definition at line 103 of file px_link_list.c.
| bool px_link_list_insert_item_start | ( | px_link_list_t * | list, |
| px_link_list_item_t * | item | ||
| ) |
Insert item to the start of the list.
| list | Pointer to the linked list |
| item | Item to be inserted |
| true | Item has been inserted |
| false | List is full |
Definition at line 109 of file px_link_list.c.
| bool px_link_list_insert_item_end | ( | px_link_list_t * | list, |
| px_link_list_item_t * | item | ||
| ) |
Add item to the end of the list.
| list | Pointer to the linked list |
| item | Item to be inserted |
| true | Item has been inserted |
| false | List is full |
Definition at line 138 of file px_link_list.c.
| bool px_link_list_insert_item_before | ( | px_link_list_t * | list, |
| px_link_list_item_t * | item, | ||
| px_link_list_item_t * | item_pos | ||
| ) |
Insert item before specified item.
| list | Pointer to the linked list |
| item | Item to be inserted |
| item_pos | Insert before this item |
| true | Item has been inserted |
| false | List is full |
Definition at line 167 of file px_link_list.c.
| bool px_link_list_insert_item_after | ( | px_link_list_t * | list, |
| px_link_list_item_t * | item, | ||
| px_link_list_item_t * | item_pos | ||
| ) |
Insert item after specified item.
| list | Pointer to the linked list |
| item | Item to be inserted |
| item_pos | Insert after this item |
| true | Item has been inserted |
| false | List is full |
Definition at line 209 of file px_link_list.c.
| px_link_list_item_t * px_link_list_remove_item_first | ( | px_link_list_t * | list | ) |
Remove first item from the list.
| list | Pointer to the linked list |
Definition at line 251 of file px_link_list.c.
| px_link_list_item_t * px_link_list_remove_item_last | ( | px_link_list_t * | list | ) |
Remove last item from the list.
| list | Pointer to the linked list |
Definition at line 281 of file px_link_list.c.
| void px_link_list_remove_item | ( | px_link_list_t * | list, |
| px_link_list_item_t * | item | ||
| ) |
Remove item from the list.
| list | Pointer to the linked list |
| item | Item to be removed from the list |
Definition at line 311 of file px_link_list.c.
| bool px_link_list_has_item | ( | px_link_list_t * | list, |
| px_link_list_item_t * | item | ||
| ) |
See if item is in the list.
| list | Pointer to the linked list |
| item | Pointer to specified item |
| true | Item is in the list |
| false | Item is not in the list |
Definition at line 342 of file px_link_list.c.