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 OsTimer.h
ericebert 0:57690853989a 4 * @version V1.1.3
ericebert 0:57690853989a 5 * @date 2010.04.26
ericebert 0:57690853989a 6 * @brief Timer manage header file
ericebert 0:57690853989a 7 * @details This file including some declares and defines related to timer
ericebert 0:57690853989a 8 * management.
ericebert 0:57690853989a 9 *******************************************************************************
ericebert 0:57690853989a 10 * @copy
ericebert 0:57690853989a 11 *
ericebert 0:57690853989a 12 * INTERNAL FILE,DON'T PUBLIC.
ericebert 0:57690853989a 13 *
ericebert 0:57690853989a 14 * <h2><center>&copy; COPYRIGHT 2009 CooCox </center></h2>
ericebert 0:57690853989a 15 *******************************************************************************
ericebert 0:57690853989a 16 */
ericebert 0:57690853989a 17
ericebert 0:57690853989a 18 #ifndef _TIMER_H
ericebert 0:57690853989a 19 #define _TIMER_H
ericebert 0:57690853989a 20
ericebert 0:57690853989a 21 #define TMR_STATE_RUNNING 0 /*!< Timer State: Running */
ericebert 0:57690853989a 22 #define TMR_STATE_STOPPED 1 /*!< Timer State: Stopped */
ericebert 0:57690853989a 23
ericebert 0:57690853989a 24 /**
ericebert 0:57690853989a 25 * @struct tmrCtrl timer.h
ericebert 0:57690853989a 26 * @brief Timer control block
ericebert 0:57690853989a 27 * @details This struct is use to manage user timer.
ericebert 0:57690853989a 28 *
ericebert 0:57690853989a 29 */
ericebert 0:57690853989a 30 typedef struct tmrCtrl /* Timer Control Block Define. */
ericebert 0:57690853989a 31 {
ericebert 0:57690853989a 32 OS_TCID tmrID; /*!< Timer ID. */
ericebert 0:57690853989a 33 U8 tmrType; /*!< Timer Type. */
ericebert 0:57690853989a 34 U8 tmrState; /*!< Timer State. */
ericebert 0:57690853989a 35 U32 tmrCnt; /*!< Timer Counter. */
ericebert 0:57690853989a 36 U32 tmrReload; /*!< Timer Reload Counter Value. */
ericebert 0:57690853989a 37 vFUNCPtr tmrCallBack; /*!< Call-back Function When Timer overrun. */
ericebert 0:57690853989a 38 struct tmrCtrl* tmrNext; /*!< Point to Next Timer Control Block. */
ericebert 0:57690853989a 39 struct tmrCtrl* tmrPrev; /*!< Point to Previous Timer Control Block*/
ericebert 0:57690853989a 40
ericebert 0:57690853989a 41 }TmrCtrl,*P_TmrCtrl;
ericebert 0:57690853989a 42
ericebert 0:57690853989a 43 /*---------------------------- Variable declare ------------------------------*/
ericebert 0:57690853989a 44 extern P_TmrCtrl TmrList; /*!< A pointer to the timer list. */
ericebert 0:57690853989a 45 extern U32 TmrIDVessel;
ericebert 0:57690853989a 46 /*---------------------------- Function declare ------------------------------*/
ericebert 0:57690853989a 47 extern void TmrDispose(void); /*!< Timer counter function. */
ericebert 0:57690853989a 48 extern void isr_TmrDispose(void);
ericebert 0:57690853989a 49 #endif