Eric Ebert
/
CoOS
CoOS Demonstrator adapted to mbed Hardware.
OsServiceReq.h@0:57690853989a, 2010-12-03 (annotated)
- 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?
User | Revision | Line number | New contents of line |
---|---|---|---|
ericebert | 0:57690853989a | 1 | |
ericebert | 0:57690853989a | 2 | /** |
ericebert | 0:57690853989a | 3 | ******************************************************************************* |
ericebert | 0:57690853989a | 4 | * @file OsServiceReq.h |
ericebert | 0:57690853989a | 5 | * @version V1.1.3 |
ericebert | 0:57690853989a | 6 | * @date 2010.04.26 |
ericebert | 0:57690853989a | 7 | * @brief Header file related to service request |
ericebert | 0:57690853989a | 8 | * @details This file including some defines and function declare related to |
ericebert | 0:57690853989a | 9 | * service request. |
ericebert | 0:57690853989a | 10 | ******************************************************************************* |
ericebert | 0:57690853989a | 11 | * @copy |
ericebert | 0:57690853989a | 12 | * |
ericebert | 0:57690853989a | 13 | * INTERNAL FILE,DON'T PUBLIC. |
ericebert | 0:57690853989a | 14 | * |
ericebert | 0:57690853989a | 15 | * <h2><center>© COPYRIGHT 2009 CooCox </center></h2> |
ericebert | 0:57690853989a | 16 | ******************************************************************************* |
ericebert | 0:57690853989a | 17 | */ |
ericebert | 0:57690853989a | 18 | |
ericebert | 0:57690853989a | 19 | |
ericebert | 0:57690853989a | 20 | #ifndef _SERVICEREQ_H |
ericebert | 0:57690853989a | 21 | #define _SERVICEREQ_H |
ericebert | 0:57690853989a | 22 | |
ericebert | 0:57690853989a | 23 | #if CFG_MAX_SERVICE_REQUEST > 0 |
ericebert | 0:57690853989a | 24 | #define SEM_REQ (U8)0x1 |
ericebert | 0:57690853989a | 25 | #define MBOX_REQ (U8)0x2 |
ericebert | 0:57690853989a | 26 | #define FLAG_REQ (U8)0x3 |
ericebert | 0:57690853989a | 27 | #define QUEUE_REQ (U8)0x4 |
ericebert | 0:57690853989a | 28 | |
ericebert | 0:57690853989a | 29 | |
ericebert | 0:57690853989a | 30 | typedef struct ServiceReqCell |
ericebert | 0:57690853989a | 31 | { |
ericebert | 0:57690853989a | 32 | U8 type; |
ericebert | 0:57690853989a | 33 | U8 id; |
ericebert | 0:57690853989a | 34 | void* arg; |
ericebert | 0:57690853989a | 35 | }SQC,*P_SQC; |
ericebert | 0:57690853989a | 36 | |
ericebert | 0:57690853989a | 37 | typedef struct ServiceReqQueue |
ericebert | 0:57690853989a | 38 | { |
ericebert | 0:57690853989a | 39 | U8 cnt; |
ericebert | 0:57690853989a | 40 | U8 head; |
ericebert | 0:57690853989a | 41 | SQC cell[CFG_MAX_SERVICE_REQUEST]; |
ericebert | 0:57690853989a | 42 | }SRQ,*P_SRQ; |
ericebert | 0:57690853989a | 43 | |
ericebert | 0:57690853989a | 44 | |
ericebert | 0:57690853989a | 45 | extern SRQ ServiceReq; |
ericebert | 0:57690853989a | 46 | extern BOOL InsertInSRQ(U8 type,U8 id,void* arg); |
ericebert | 0:57690853989a | 47 | #endif |
ericebert | 0:57690853989a | 48 | |
ericebert | 0:57690853989a | 49 | extern void RespondSRQ(void); |
ericebert | 0:57690853989a | 50 | extern BOOL TimeReq; |
ericebert | 0:57690853989a | 51 | extern BOOL TimerReq; |
ericebert | 0:57690853989a | 52 | extern BOOL IsrReq; |
ericebert | 0:57690853989a | 53 | #endif |