/*\r
- * Copyright 2018 NXP\r
+ * Copyright 2018-2019 NXP\r
* All rights reserved.\r
*\r
*\r
#ifndef _GENERIC_LIST_H_\r
#define _GENERIC_LIST_H_\r
\r
+/*!\r
+ * @addtogroup GenericList\r
+ * @{\r
+ */\r
+\r
/*!*********************************************************************************\r
*************************************************************************************\r
* Include\r
/*! @brief The list status */\r
typedef enum _list_status\r
{\r
- kLIST_Ok = kStatus_Success, /*!< Success */\r
- kLIST_Full = MAKE_STATUS(kStatusGroup_LIST, 1), /*!< FULL */\r
- kLIST_Empty = MAKE_STATUS(kStatusGroup_LIST, 2), /*!< Empty */\r
- kLIST_OrphanElement = MAKE_STATUS(kStatusGroup_LIST, 3), /*!< Orphan Element */\r
-}list_status_t;\r
+ kLIST_Ok = kStatus_Success, /*!< Success */\r
+ kLIST_DuplicateError = MAKE_STATUS(kStatusGroup_LIST, 1), /*!< Duplicate Error */\r
+ kLIST_Full = MAKE_STATUS(kStatusGroup_LIST, 2), /*!< FULL */\r
+ kLIST_Empty = MAKE_STATUS(kStatusGroup_LIST, 3), /*!< Empty */\r
+ kLIST_OrphanElement = MAKE_STATUS(kStatusGroup_LIST, 4), /*!< Orphan Element */\r
+} list_status_t;\r
\r
/*! @brief The list structure*/\r
-typedef struct list_tag\r
+typedef struct list_label\r
{\r
- struct list_element_tag *head; /*!< list head */\r
- struct list_element_tag *tail; /*!< list tail */\r
- uint16_t size; /*!< list size */\r
- uint16_t max; /*!< list max number of elements */\r
-}list_t, *list_handle_t;\r
+ struct list_element_tag *head; /*!< list head */\r
+ struct list_element_tag *tail; /*!< list tail */\r
+ uint16_t size; /*!< list size */\r
+ uint16_t max; /*!< list max number of elements */\r
+} list_label_t, *list_handle_t;\r
\r
/*! @brief The list element*/\r
typedef struct list_element_tag\r
{\r
- struct list_element_tag *next; /*!< next list element */\r
- struct list_element_tag *prev; /*!< previous list element */\r
- struct list_tag *list; /*!< pointer to the list */\r
-}list_element_t, *list_element_handle_t;\r
+ struct list_element_tag *next; /*!< next list element */\r
+ struct list_element_tag *prev; /*!< previous list element */\r
+ struct list_label *list; /*!< pointer to the list */\r
+} list_element_t, *list_element_handle_t;\r
\r
/*! *********************************************************************************\r
*************************************************************************************\r
#if defined(__cplusplus)\r
}\r
#endif\r
-\r
+/*! @}*/\r
#endif /*_GENERIC_LIST_H_*/\r