Go to the documentation of this file.
21 if ((list->
max != 0U) && (list->
max == list->
size))
27 while (element !=
NULL)
30 if (element == newElement)
35 element = element->
next;
66 list->
max = (uint16_t)max;
114 if (list->
size == 0U)
116 list->
head = element;
122 #if (defined(GENERIC_LIST_LIGHT) && (GENERIC_LIST_LIGHT > 0U))
126 element->
list = list;
128 list->
tail = element;
161 if (list->
size == 0U)
163 list->
tail = element;
165 #if (defined(GENERIC_LIST_LIGHT) && (GENERIC_LIST_LIGHT > 0U))
173 element->
list = list;
175 list->
head = element;
204 if ((
NULL == list) || (list->
size == 0U))
210 element = list->
head;
212 if (list->
size == 0U)
216 #if (defined(GENERIC_LIST_LIGHT) && (GENERIC_LIST_LIGHT > 0U))
268 return element->
next;
288 #if (defined(GENERIC_LIST_LIGHT) && (GENERIC_LIST_LIGHT > 0U))
291 return element->
prev;
321 #if (defined(GENERIC_LIST_LIGHT) && (GENERIC_LIST_LIGHT > 0U))
330 if (element_list->
next == element)
335 element_list = element_list->
next;
395 #if (defined(GENERIC_LIST_LIGHT) && (GENERIC_LIST_LIGHT > 0U))
399 if ((element_list->
next == element) || (element_list == element))
401 if (element_list == element)
407 element_list->
next = newElement;
410 newElement->
next = element;
414 element_list = element_list->
next;
428 newElement->
next = element;
430 element->
prev = newElement;
474 return ((uint32_t)list->
max - (uint32_t)list->
size);
struct list_element_tag * next
uint32_t LIST_GetSize(list_handle_t list)
Gets the current size of a list.
void LIST_Init(list_handle_t list, uint32_t max)
Initialises the list descriptor.
enum _list_status list_status_t
The list status.
list_element_handle_t LIST_GetHead(list_handle_t list)
Gets head element ID.
list_handle_t LIST_GetList(list_element_handle_t element)
Gets the list that contains the given element.
static list_status_t LIST_Error_Check(list_handle_t list, list_element_handle_t newElement)
list_status_t LIST_RemoveElement(list_element_handle_t element)
Unlinks an element from its list.
list_status_t LIST_AddTail(list_handle_t list, list_element_handle_t element)
Links element to the tail of the list.
struct list_element_tag * tail
list_element_handle_t LIST_GetPrev(list_element_handle_t element)
Gets previous element ID.
struct list_element_tag * head
static uint32_t DisableGlobalIRQ(void)
Disable the global IRQ.
list_status_t LIST_AddHead(list_handle_t list, list_element_handle_t element)
Links element to the head of the list.
struct list_element_tag * prev
list_element_handle_t LIST_RemoveHead(list_handle_t list)
Unlinks element from the head of the list.
uint32_t LIST_GetAvailableSize(list_handle_t list)
Gets the number of free places in the list.
static void EnableGlobalIRQ(uint32_t primask)
Enable the global IRQ.
list_element_handle_t LIST_GetNext(list_element_handle_t element)
Gets next element ID.
list_status_t LIST_AddPrevElement(list_element_handle_t element, list_element_handle_t newElement)
Links an element in the previous position relative to a given member of a list.