comparison gpf/INC/NUC/tm_defs.h @ 0:509db1a7b7b8

initial import: leo2moko-r1
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 01 Jun 2015 03:24:05 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:509db1a7b7b8
1 /*************************************************************************/
2 /* */
3 /* Copyright (c) 1993-1996 Accelerated Technology, Inc. */
4 /* */
5 /* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */
6 /* subject matter of this material. All manufacturing, reproduction, */
7 /* use, and sales rights pertaining to this subject matter are governed */
8 /* by the license agreement. The recipient of this software implicitly */
9 /* accepts the terms of the license. */
10 /* */
11 /*************************************************************************/
12
13 /*************************************************************************/
14 /* */
15 /* FILE NAME VERSION */
16 /* */
17 /* tm_defs.h PLUS 1.2 */
18 /* */
19 /* COMPONENT */
20 /* */
21 /* TM - Timer Management */
22 /* */
23 /* DESCRIPTION */
24 /* */
25 /* This file contains data structure definitions and constants for */
26 /* the Timer Management component. */
27 /* */
28 /* AUTHOR */
29 /* */
30 /* William E. Lamie, Accelerated Technology, Inc. */
31 /* */
32 /* DATA STRUCTURES */
33 /* */
34 /* TM_TCB Timer control block */
35 /* TM_APP_TCB Application timer control */
36 /* block */
37 /* */
38 /* FUNCTIONS */
39 /* */
40 /* None */
41 /* */
42 /* DEPENDENCIES */
43 /* */
44 /* cs_defs.h Common service definitions */
45 /* tc_defs.h Thread control definitions */
46 /* */
47 /* HISTORY */
48 /* */
49 /* NAME DATE REMARKS */
50 /* */
51 /* W. Lamie 03-01-1993 Created initial version 1.0 */
52 /* D. Lamie 04-19-1993 Verified version 1.0 */
53 /* W. Lamie 03-01-1994 Moved include files outside of */
54 /* the file #ifndef to allow the */
55 /* use of actual data structures, */
56 /* resulting in version 1.1 */
57 /* R. Pfaff - */
58 /* D. Lamie 03-18-1994 Verified version 1.1 */
59 /* M.Q. Qian 04-17-1996 updated to version 1.2 */
60 /* */
61 /*************************************************************************/
62
63 #include "cs_defs.h" /* Common service constants */
64
65
66 /* Check to see if the file has been included already. */
67
68 #ifndef TM_DEFS
69 #define TM_DEFS
70
71
72 /* Define constants local to this component. */
73
74 #define TM_TIMER_ID 0x54494d45UL
75 #define TM_ACTIVE 0
76 #define TM_NOT_ACTIVE 1
77 #define TM_EXPIRED 2
78 #define TM_TASK_TIMER 0
79 #define TM_APPL_TIMER 1
80
81 /* Define the Timer Control Block data type. */
82
83 typedef struct TM_TCB_STRUCT
84 {
85 INT tm_timer_type; /* Application/Task */
86 UNSIGNED tm_remaining_time; /* Remaining time */
87 VOID *tm_information; /* Information pointer */
88 struct TM_TCB_STRUCT
89 *tm_next_timer, /* Next timer in list */
90 *tm_previous_timer; /* Previous timer in list*/
91 } TM_TCB;
92
93
94 /* Define Application's Timer Control Block data type. */
95
96 typedef struct TM_APP_TCB_STRUCT
97 {
98 CS_NODE tm_created; /* Node for linking to */
99 /* created timer list */
100 UNSIGNED tm_id; /* Internal TCB ID */
101 CHAR tm_name[NU_MAX_NAME]; /* Timer name */
102 VOID (*tm_expiration_routine)(UNSIGNED); /* Expiration function */
103 UNSIGNED tm_expiration_id; /* Expiration ID */
104 INT tm_enabled; /* Timer enabled flag */
105 UNSIGNED tm_expirations; /* Number of expirations */
106 UNSIGNED tm_initial_time; /* Initial time */
107 UNSIGNED tm_reschedule_time; /* Reschedule time */
108 TM_TCB tm_actual_timer; /* Actual timer internals*/
109 } TM_APP_TCB;
110
111
112 /* Include this file here, since it contains references to the timer definition
113 structure that is defined by this file. */
114
115 #include "tc_defs.h"
116
117 #endif