-
-
Notifications
You must be signed in to change notification settings - Fork 95
/
Copy pathOsFlag.h
57 lines (48 loc) · 1.91 KB
/
OsFlag.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
*******************************************************************************
* @file OsFlag.h
* @version V1.1.4
* @date 2011.04.20
* @brief Evnet flag management header file
* @details This file including some defines and declares about flag management.
*******************************************************************************
* @copy
*
* INTERNAL FILE,DON'T PUBLIC.
*
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
*******************************************************************************
*/
#ifndef _FLAG_H
#define _FLAG_H
/**
* @struct FlagNode flag.h
* @brief Flag node struct
* @details
*/
typedef struct FlagNode
{
struct FlagNode* nextNode; /*!< A pointer to next flag node */
struct FlagNode* prevNode; /*!< A pointer to prev flag node */
U32 waitFlags; /*!< Flag value */
P_OSTCB waitTask; /*!< A pointer to task waitting flag */
U8 waitType; /*!< Wait type */
}FLAG_NODE,*P_FLAG_NODE;
/**
* @struct Flag flag.h
* @brief Flag control block
* @details This struct use to mange event flag.
*/
typedef struct Flag
{
U32 flagRdy; /*!< Ready flag */
U32 resetOpt; /*!< Reset option */
U32 flagActive; /*!< Active flag */
P_FLAG_NODE headNode; /*!< Head node */
P_FLAG_NODE tailNode; /*!< Tail node */
}FCB,*P_FCB;
/*---------------------------- Variable declare ------------------------------*/
extern FCB FlagCrl;
/*---------------------------- Function declare ------------------------------*/
extern void RemoveLinkNode(P_FLAG_NODE pnode);
#endif