comparison nuc-fw/nucleus/tm_defs.h @ 79:947b1f473960

beginning of nuc-fw
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 11 Aug 2013 07:17:25 +0000
parents
children
comparison
equal deleted inserted replaced
78:2c266d4339ff 79:947b1f473960
1 /*************************************************************************/
2 /* */
3 /* Copyright Mentor Graphics Corporation 2002 */
4 /* All Rights Reserved. */
5 /* */
6 /* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS */
7 /* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS */
8 /* SUBJECT TO LICENSE TERMS. */
9 /* */
10 /*************************************************************************/
11
12 /*************************************************************************/
13 /* */
14 /* FILE NAME VERSION */
15 /* */
16 /* tm_defs.h Nucleus PLUS 1.14 */
17 /* */
18 /* COMPONENT */
19 /* */
20 /* TM - Timer Management */
21 /* */
22 /* DESCRIPTION */
23 /* */
24 /* This file contains data structure definitions and constants for */
25 /* the Timer Management component. */
26 /* */
27 /* DATA STRUCTURES */
28 /* */
29 /* TM_TCB Timer control block */
30 /* TM_APP_TCB Application timer control */
31 /* block */
32 /* */
33 /* FUNCTIONS */
34 /* */
35 /* None */
36 /* */
37 /* DEPENDENCIES */
38 /* */
39 /* cs_defs.h Common service definitions */
40 /* tc_defs.h Thread control definitions */
41 /* */
42 /* HISTORY */
43 /* */
44 /* DATE REMARKS */
45 /* */
46 /* 03-01-1993 Created initial version 1.0 */
47 /* 04-19-1993 Verified version 1.0 */
48 /* 03-01-1994 Moved include files outside of */
49 /* the file #ifndef to allow the */
50 /* use of actual data structures, */
51 /* resulting in version 1.1 */
52 /* */
53 /* 03-18-1994 Verified version 1.1 */
54 /* 04-17-1996 updated to version 1.2 */
55 /* 03-24-1998 Released version 1.3. */
56 /* 03-26-1999 Released 1.11m (new release */
57 /* numbering scheme) */
58 /* 04-17-2002 Released version 1.13m */
59 /* 11-07-2002 Released version 1.14 */
60 /*************************************************************************/
61
62 #include "cs_defs.h" /* Common service constants */
63
64
65 /* Check to see if the file has been included already. */
66
67 #ifndef TM_DEFS
68 #define TM_DEFS
69
70
71 /* Define constants local to this component. */
72
73 #define TM_TIMER_ID 0x54494d45UL
74 #define TM_ACTIVE 0
75 #define TM_NOT_ACTIVE 1
76 #define TM_EXPIRED 2
77 #define TM_TASK_TIMER 0
78 #define TM_APPL_TIMER 1
79
80 /* Define the Timer Control Block data type. */
81
82 typedef struct TM_TCB_STRUCT
83 {
84 INT tm_timer_type; /* Application/Task */
85 UNSIGNED tm_remaining_time; /* Remaining time */
86 VOID *tm_information; /* Information pointer */
87 struct TM_TCB_STRUCT
88 *tm_next_timer, /* Next timer in list */
89 *tm_previous_timer; /* Previous timer in list*/
90 } TM_TCB;
91
92
93 /* Define Application's Timer Control Block data type. */
94
95 typedef struct TM_APP_TCB_STRUCT
96 {
97 CS_NODE tm_created; /* Node for linking to */
98 /* created timer list */
99 UNSIGNED tm_id; /* Internal TCB ID */
100 CHAR tm_name[NU_MAX_NAME]; /* Timer name */
101 VOID (*tm_expiration_routine)(UNSIGNED); /* Expiration function */
102 UNSIGNED tm_expiration_id; /* Expiration ID */
103 BOOLEAN tm_enabled; /* Timer enabled flag */
104
105 #if PAD_3
106 DATA_ELEMENT tc_padding[PAD_3];
107 #endif
108
109 UNSIGNED tm_expirations; /* Number of expirations */
110 UNSIGNED tm_initial_time; /* Initial time */
111 UNSIGNED tm_reschedule_time; /* Reschedule time */
112 TM_TCB tm_actual_timer; /* Actual timer internals*/
113 } TM_APP_TCB;
114
115
116 /* Include this file here, since it contains references to the timer definition
117 structure that is defined by this file. */
118
119 #include "tc_defs.h"
120
121 #endif /* TM_DEFS */
122
123
124
125