CoOS Demonstrator adapted to mbed Hardware.

Dependencies:   mbed

Committer:
ericebert
Date:
Fri Dec 03 19:45:30 2010 +0000
Revision:
0:57690853989a
Some basic LED-Flashing works in the CoOS-RTOS using Tasks

Who changed what in which revision?

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