1 /* USER CODE BEGIN Header */
2 /**
3   ******************************************************************************
4   * @file    stm_list.h
5   * @author  MCD Application Team
6   * @brief   Header file for linked list library.
7   ******************************************************************************
8   * @attention
9   *
10   * Copyright (c) 2022 STMicroelectronics.
11   * All rights reserved.
12   *
13   * This software is licensed under terms that can be found in the LICENSE file
14   * in the root directory of this software component.
15   * If no LICENSE file comes with this software, it is provided AS-IS.
16   *
17   ******************************************************************************
18   */
19 /* USER CODE END Header */
20 
21 #ifndef STM_LIST_H
22 #define STM_LIST_H
23 
24 /* Includes ------------------------------------------------------------------*/
25 #include "stm32_wpan_common.h"
26 
27 typedef __PACKED_STRUCT _tListNode {
28     struct _tListNode * next;
29     struct _tListNode * prev;
30 } tListNode;
31 
32 void LST_init_head (tListNode * listHead);
33 
34 uint8_t LST_is_empty (tListNode * listHead);
35 
36 void LST_insert_head (tListNode * listHead, tListNode * node);
37 
38 void LST_insert_tail (tListNode * listHead, tListNode * node);
39 
40 void LST_remove_node (tListNode * node);
41 
42 void LST_remove_head (tListNode * listHead, tListNode ** node );
43 
44 void LST_remove_tail (tListNode * listHead, tListNode ** node );
45 
46 void LST_insert_node_after (tListNode * node, tListNode * ref_node);
47 
48 void LST_insert_node_before (tListNode * node, tListNode * ref_node);
49 
50 int LST_get_size (tListNode * listHead);
51 
52 void LST_get_next_node (tListNode * ref_node, tListNode ** node);
53 
54 void LST_get_prev_node (tListNode * ref_node, tListNode ** node);
55 
56 #endif /* STM_LIST_H */
57