![]() |
MCUXpresso SDK API Reference Manual
Rev 2.16.000
NXP Semiconductors
|
Data Structures | |
| struct | list_label |
| The list structure. More... | |
| struct | list_element_tag |
| The list element. More... | |
Macros | |
| #define | GENERIC_LIST_LIGHT (1) |
| Definition to determine whether use list light. More... | |
| #define | GENERIC_LIST_DUPLICATED_CHECKING (0) |
| Definition to determine whether enable list duplicated checking. More... | |
Typedefs | |
| typedef enum _list_status | list_status_t |
| The list status. | |
| typedef struct list_label | list_label_t |
| The list structure. | |
| typedef struct list_element_tag | list_element_t |
| The list element. | |
Enumerations | |
| enum | _list_status { kLIST_Ok = kStatus_Success, kLIST_DuplicateError = MAKE_STATUS(kStatusGroup_LIST, 1), kLIST_Full = MAKE_STATUS(kStatusGroup_LIST, 2), kLIST_Empty = MAKE_STATUS(kStatusGroup_LIST, 3), kLIST_OrphanElement = MAKE_STATUS(kStatusGroup_LIST, 4), kLIST_NotSupport = MAKE_STATUS(kStatusGroup_LIST, 5) } |
| The list status. More... | |
Functions | |
| void | LIST_Init (list_handle_t list, uint32_t max) |
| Initialize the list. More... | |
| list_handle_t | LIST_GetList (list_element_handle_t listElement) |
| Gets the list that contains the given element. More... | |
| list_status_t | LIST_AddHead (list_handle_t list, list_element_handle_t listElement) |
| Links element to the head of the list. More... | |
| list_status_t | LIST_AddTail (list_handle_t list, list_element_handle_t listElement) |
| Links element to the tail of the list. More... | |
| list_element_handle_t | LIST_RemoveHead (list_handle_t list) |
| Unlinks element from the head of the list. More... | |
| list_element_handle_t | LIST_GetHead (list_handle_t list) |
| Gets head element handle. More... | |
| list_element_handle_t | LIST_GetNext (list_element_handle_t listElement) |
| Gets next element handle for given element handle. More... | |
| list_element_handle_t | LIST_GetPrev (list_element_handle_t listElement) |
| Gets previous element handle for given element handle. More... | |
| list_status_t | LIST_RemoveElement (list_element_handle_t listElement) |
| Unlinks an element from its list. More... | |
| list_status_t | LIST_AddPrevElement (list_element_handle_t listElement, list_element_handle_t newElement) |
| Links an element in the previous position relative to a given member of a list. More... | |
| uint32_t | LIST_GetSize (list_handle_t list) |
| Gets the current size of a list. More... | |
| uint32_t | LIST_GetAvailableSize (list_handle_t list) |
| Gets the number of free places in the list. More... | |
| struct list_label |
Data Fields | |
| struct list_element_tag * | head |
| list head | |
| struct list_element_tag * | tail |
| list tail | |
| uint32_t | size |
| list size | |
| uint32_t | max |
| list max number of elements | |
| struct list_element_tag |
Data Fields | |
| struct list_element_tag * | next |
| next list element | |
| struct list_label * | list |
| pointer to the list | |
| #define GENERIC_LIST_LIGHT (1) |
| #define GENERIC_LIST_DUPLICATED_CHECKING (0) |
| enum _list_status |
| void LIST_Init | ( | list_handle_t | list, |
| uint32_t | max | ||
| ) |
This function initialize the list.
| list | - List handle to initialize. |
| max | - Maximum number of elements in list. 0 for unlimited. |
| list_handle_t LIST_GetList | ( | list_element_handle_t | listElement | ) |
| listElement | - Handle of the element. |
| NULL | if element is orphan, Handle of the list the element is inserted into. |
| list_status_t LIST_AddHead | ( | list_handle_t | list, |
| list_element_handle_t | listElement | ||
| ) |
| list | - Handle of the list. |
| listElement | - Handle of the element. |
| kLIST_Full | if list is full, kLIST_Ok if insertion was successful. |
| list_status_t LIST_AddTail | ( | list_handle_t | list, |
| list_element_handle_t | listElement | ||
| ) |
| list | - Handle of the list. |
| listElement | - Handle of the element. |
| kLIST_Full | if list is full, kLIST_Ok if insertion was successful. |
| list_element_handle_t LIST_RemoveHead | ( | list_handle_t | list | ) |
| list | - Handle of the list. |
| NULL | if list is empty, handle of removed element(pointer) if removal was successful. |
| list_element_handle_t LIST_GetHead | ( | list_handle_t | list | ) |
| list | - Handle of the list. |
| NULL | if list is empty, handle of removed element(pointer) if removal was successful. |
| list_element_handle_t LIST_GetNext | ( | list_element_handle_t | listElement | ) |
| listElement | - Handle of the element. |
| NULL | if list is empty, handle of removed element(pointer) if removal was successful. |
| list_element_handle_t LIST_GetPrev | ( | list_element_handle_t | listElement | ) |
| listElement | - Handle of the element. |
| NULL | if list is empty, handle of removed element(pointer) if removal was successful. |
| list_status_t LIST_RemoveElement | ( | list_element_handle_t | listElement | ) |
| listElement | - Handle of the element. |
| kLIST_OrphanElement | if element is not part of any list. |
| kLIST_Ok | if removal was successful. |
| list_status_t LIST_AddPrevElement | ( | list_element_handle_t | listElement, |
| list_element_handle_t | newElement | ||
| ) |
| listElement | - Handle of the element. |
| newElement | - New element to insert before the given member. |
| kLIST_OrphanElement | if element is not part of any list. |
| kLIST_Ok | if removal was successful. |
| uint32_t LIST_GetSize | ( | list_handle_t | list | ) |
| list | - Handle of the list. |
| Current | size of the list. |
| uint32_t LIST_GetAvailableSize | ( | list_handle_t | list | ) |
| list | - Handle of the list. |
| Available | size of the list. |