FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/nucleus/debug-chases/tms.c.dbg @ 341:fcbdb2ae1a47
OSL: os_CreateTask() done
| author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> | 
|---|---|
| date | Sat, 03 May 2014 12:24:56 +0000 | 
| parents | afceeeb2cba1 | 
| children | 
| rev | line source | 
|---|---|
| 
138
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
1 /*************************************************************************/ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
2 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
3 /* Copyright Mentor Graphics Corporation 2002 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
4 /* All Rights Reserved. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
5 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
6 /* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
7 /* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
8 /* SUBJECT TO LICENSE TERMS. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
9 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
10 /*************************************************************************/ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
11 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
12 /*************************************************************************/ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
13 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
14 /* FILE NAME VERSION */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
15 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
16 /* tms.c Nucleus PLUS 1.14 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
17 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
18 /* COMPONENT */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
19 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
20 /* TM - Timer Management */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
21 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
22 /* DESCRIPTION */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
23 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
24 /* This file contains supplemental routines for the timer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
25 /* management component. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
26 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
27 /* DATA STRUCTURES */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
28 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
29 /* None */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
30 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
31 /* FUNCTIONS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
32 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
33 /* TMS_Create_Timer Create an application timer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
34 /* TMS_Delete_Timer Delete an application timer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
35 /* TMS_Reset_Timer Reset application timer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
36 /* TMS_Control_Timer Enable/Disable application */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
37 /* timer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
38 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
39 /* DEPENDENCIES */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
40 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
41 /* cs_extr.h Common Service functions */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
42 /* tc_extr.h Thread Control functions */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
43 /* tm_extr.h Timer functions */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
44 /* hi_extr.h History functions */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
45 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
46 /* HISTORY */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
47 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
48 /* DATE REMARKS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
49 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
50 /* 03-01-1994 Created initial version 1.1 from */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
51 /* previous version of TMC.C */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
52 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
53 /* 03-18-1994 Verified version 1.1 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
54 /* 04-17-1996 updated to version 1.2 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
55 /* 03-24-1998 Released version 1.3. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
56 /* 03-26-1999 Released 1.11m (new release */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
57 /* numbering scheme) */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
58 /* 04-17-2002 Released version 1.13m */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
59 /* 11-07-2002 Released version 1.14 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
60 /*************************************************************************/ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
61 #define NU_SOURCE_FILE | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
62 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
63 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
64 #include "cs_extr.h" /* Common service functions */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
65 #include "tc_extr.h" /* Thread control functions */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
66 #include "tm_extr.h" /* Timer functions */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
67 #include "hi_extr.h" /* History functions */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
68 #include "profiler.h" /* ProView interface */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
69 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
70 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
71 /* Define external inner-component global data references. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
72 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
73 extern CS_NODE *TMD_Created_Timers_List; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
74 extern UNSIGNED TMD_Total_Timers; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
75 extern TM_TCB *TMD_Active_Timers_List; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
76 extern INT TMD_Active_List_Busy; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
77 extern TC_PROTECT TMD_Created_List_Protect; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
78 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
79 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
80 /* Define internal function prototypes. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
81 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
82 VOID TMC_Start_Timer(TM_TCB *timer, UNSIGNED time); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
83 VOID TMC_Stop_Timer(TM_TCB *timer); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
84 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
85 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
86 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
87 /*************************************************************************/ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
88 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
89 /* FUNCTION */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
90 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
91 /* TMS_Create_Timer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
92 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
93 /* DESCRIPTION */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
94 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
95 /* This function creates an application timer and places it on the */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
96 /* list of created timers. The timer is activated if designated by */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
97 /* the enable parameter. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
98 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
99 /* CALLED BY */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
100 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
101 /* Application */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
102 /* TMSE_Create_Timer Error checking shell */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
103 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
104 /* CALLS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
105 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
106 /* CSC_Place_On_List Add node to linked-list */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
107 /* [HIC_Make_History_Entry] Make entry in history log */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
108 /* [TCT_Check_Stack] Stack checking function */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
109 /* TCT_Protect Data structure protect */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
110 /* TCT_Unprotect Un-protect data structure */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
111 /* TMS_Control_Timer Enable the new timer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
112 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
113 /* INPUTS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
114 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
115 /* timer_ptr Timer control block pointer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
116 /* name Timer name */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
117 /* expiration_routine Timer expiration routine */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
118 /* id Timer expiration ID */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
119 /* initial_time Initial expiration time */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
120 /* reschedule_time Reschedule expiration time */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
121 /* enable Automatic enable option */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
122 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
123 /* OUTPUTS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
124 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
125 /* NU_SUCCESS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
126 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
127 /* HISTORY */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
128 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
129 /* DATE REMARKS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
130 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
131 /* 03-01-1993 Created initial version 1.0 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
132 /* 04-19-1993 Verified version 1.0 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
133 /* 03-01-1994 Changed function prototype, */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
134 /* resulting in version 1.1 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
135 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
136 /* 03-18-1994 Verified version 1.1 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
137 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
138 /*************************************************************************/ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
139 STATUS TMS_Create_Timer(NU_TIMER *timer_ptr, CHAR *name, | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
140 VOID (*expiration_routine)(UNSIGNED), UNSIGNED id, | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
141 UNSIGNED initial_time, UNSIGNED reschedule_time, OPTION enable) | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
142 { | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
143 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
144 R1 TM_APP_TCB *timer; /* Timer control block ptr */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
145 INT i; /* Working index variable */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
146 NU_SUPERV_USER_VARIABLES | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
147 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
148 /* Switch to supervisor mode */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
149 NU_SUPERVISOR_MODE(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
150 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
151 /* Move input timer pointer into internal pointer. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
152 timer = (TM_APP_TCB *) timer_ptr; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
153 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
154 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
155 #ifdef NU_ENABLE_STACK_CHECK | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
156 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
157 /* Call stack checking function to check for an overflow condition. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
158 TCT_Check_Stack(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
159 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
160 #endif | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
161 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
162 #ifdef NU_ENABLE_HISTORY | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
163 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
164 /* Make an entry that corresponds to this function in the system history | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
165 log. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
166 HIC_Make_History_Entry(NU_CREATE_TIMER_ID, (UNSIGNED) timer, | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
167 (UNSIGNED) name, (UNSIGNED) expiration_routine); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
168 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
169 #endif | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
170 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
171 /* First, clear the timer ID just in case it is an old Timer | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
172 Control Block. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
173 timer -> tm_id = 0; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
174 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
175 /* Fill in the timer name. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
176 for (i = 0; i < NU_MAX_NAME; i++) | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
177 timer -> tm_name[i] = name[i]; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
178 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
179 /* Load the timer with the appropriate values. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
180 timer -> tm_expiration_routine = expiration_routine; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
181 timer -> tm_expiration_id = id; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
182 timer -> tm_expirations = 0; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
183 timer -> tm_initial_time = initial_time; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
184 timer -> tm_reschedule_time = reschedule_time; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
185 timer -> tm_actual_timer.tm_timer_type = TM_APPL_TIMER; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
186 timer -> tm_enabled = NU_FALSE; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
187 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
188 /* Initialize link pointers. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
189 timer -> tm_created.cs_previous = NU_NULL; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
190 timer -> tm_created.cs_next = NU_NULL; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
191 timer -> tm_actual_timer.tm_next_timer = NU_NULL; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
192 timer -> tm_actual_timer.tm_previous_timer= NU_NULL; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
193 timer -> tm_actual_timer.tm_information = (VOID *) timer; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
194 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
195 /* Protect against access to the list of created timers. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
196 TCT_Protect(&TMD_Created_List_Protect); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
197 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
198 /* At this point the timer is completely built. The ID can now be | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
199 set and it can be linked into the created timer list. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
200 timer -> tm_id = TM_TIMER_ID; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
201 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
202 /* Link the timer into the list of created timers and increment the | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
203 total number of timers in the system. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
204 CSC_Place_On_List(&TMD_Created_Timers_List, &(timer -> tm_created)); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
205 TMD_Total_Timers++; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
206 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
207 #ifdef INCLUDE_PROVIEW | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
208 _RTProf_DumpTimer(RT_PROF_CREATE_TIMER,timer,RT_PROF_OK); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
209 #endif | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
210 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
211 /* Release protection against access to the list of created timers. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
212 TCT_Unprotect(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
213 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
214 /* Determine if the timer should be enabled. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
215 if (enable == NU_ENABLE_TIMER) | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
216 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
217 /* Activate the timer. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
218 TMS_Control_Timer(timer_ptr, NU_ENABLE_TIMER); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
219 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
220 /* Return to user mode */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
221 NU_USER_MODE(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
222 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
223 /* Return successful completion. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
224 return(NU_SUCCESS); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
225 } | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
226 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
227 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
228 /*************************************************************************/ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
229 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
230 /* FUNCTION */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
231 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
232 /* TMS_Delete_Timer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
233 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
234 /* DESCRIPTION */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
235 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
236 /* This function deletes an application timer and removes it from */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
237 /* the list of created timers. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
238 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
239 /* CALLED BY */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
240 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
241 /* Application */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
242 /* TMSE_Delete_Timer Error checking shell */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
243 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
244 /* CALLS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
245 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
246 /* CSC_Remove_From_List Remove node from list */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
247 /* [HIC_Make_History_Entry] Make entry in history log */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
248 /* [TCT_Check_Stack] Stack checking function */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
249 /* TCT_Protect Protect created list */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
250 /* TCT_System_Protect Protect active list */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
251 /* TCT_Unprotect Release protection */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
252 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
253 /* INPUTS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
254 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
255 /* timer_ptr Timer control block pointer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
256 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
257 /* OUTPUTS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
258 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
259 /* NU_NOT_DISABLED Timer not disabled first */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
260 /* NU_SUCCESS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
261 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
262 /* HISTORY */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
263 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
264 /* DATE REMARKS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
265 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
266 /* 03-01-1993 Created initial version 1.0 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
267 /* 04-19-1993 Verified version 1.0 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
268 /* 03-01-1994 Modified protection logic to use */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
269 /* system protection, changed */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
270 /* function prototype, resulting */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
271 /* in version 1.1 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
272 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
273 /* 03-18-1994 Verified version 1.1 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
274 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
275 /*************************************************************************/ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
276 STATUS TMS_Delete_Timer(NU_TIMER *timer_ptr) | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
277 { | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
278 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
279 TM_APP_TCB *timer; /* Timer control block ptr */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
280 STATUS status; /* Completion status */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
281 NU_SUPERV_USER_VARIABLES | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
282 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
283 /* Switch to supervisor mode */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
284 NU_SUPERVISOR_MODE(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
285 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
286 /* Move input timer pointer into internal pointer. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
287 timer = (TM_APP_TCB *) timer_ptr; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
288 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
289 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
290 #ifdef NU_ENABLE_STACK_CHECK | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
291 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
292 /* Call stack checking function to check for an overflow condition. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
293 TCT_Check_Stack(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
294 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
295 #endif | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
296 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
297 #ifdef NU_ENABLE_HISTORY | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
298 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
299 /* Make an entry that corresponds to this function in the system history | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
300 log. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
301 HIC_Make_History_Entry(NU_DELETE_TIMER_ID, (UNSIGNED) timer, | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
302 (UNSIGNED) 0, (UNSIGNED) 0); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
303 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
304 #endif | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
305 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
306 /* Initialize the status. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
307 status = NU_SUCCESS; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
308 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
309 /* Use system protect to protect the active timer list temporarily. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
310 TCT_System_Protect(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
311 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
312 /* Determine if the timer is currently disabled. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
313 if (timer -> tm_enabled) | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
314 { | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
315 /* Error, indicate to the caller that the timer is currently active. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
316 status = NU_NOT_DISABLED; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
317 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
318 #ifdef INCLUDE_PROVIEW | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
319 _RTProf_DumpTimer(RT_PROF_DELETE_TIMER,timer,RT_PROF_FAIL); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
320 #endif | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
321 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
322 } | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
323 else | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
324 { | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
325 /* Clear the timer ID. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
326 timer -> tm_id = 0; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
327 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
328 #ifdef INCLUDE_PROVIEW | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
329 _RTProf_DumpTimer(RT_PROF_DELETE_TIMER,timer,RT_PROF_OK); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
330 #endif /* INCLUDE_PROVIEW */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
331 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
332 } | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
333 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
334 /* Release protection. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
335 TCT_Unprotect(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
336 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
337 /* Determine if an error was detected. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
338 if (status == NU_SUCCESS) | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
339 { | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
340 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
341 /* Protect against access to the list of created timers. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
342 TCT_Protect(&TMD_Created_List_Protect); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
343 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
344 /* Remove the timer from the list of created timers. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
345 CSC_Remove_From_List(&TMD_Created_Timers_List, &(timer -> tm_created)); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
346 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
347 /* Decrement the total number of created timers. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
348 TMD_Total_Timers--; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
349 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
350 /* Release protection against access to the list of created timers. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
351 TCT_Unprotect(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
352 } | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
353 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
354 /* Return to user mode */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
355 NU_USER_MODE(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
356 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
357 /* Return completion status. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
358 return(status); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
359 } | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
360 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
361 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
362 /*************************************************************************/ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
363 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
364 /* FUNCTION */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
365 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
366 /* TMS_Reset_Timer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
367 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
368 /* DESCRIPTION */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
369 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
370 /* This function resets the specified application timer. Note that */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
371 /* the timer must be in a disabled state prior to this call. The */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
372 /* timer is activated after it is reset if the enable parameter */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
373 /* specifies automatic activation. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
374 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
375 /* CALLED BY */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
376 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
377 /* Application */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
378 /* TMSE_Reset_Timer Error checking shell */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
379 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
380 /* CALLS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
381 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
382 /* [HIC_Make_History_Entry] Make entry in history log */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
383 /* [TCT_Check_Stack] Stack checking function */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
384 /* TCT_System_Protect Protect active list */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
385 /* TCT_Unprotect Release protection */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
386 /* TMS_Control_Timer Enable/disable timer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
387 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
388 /* INPUTS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
389 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
390 /* timer_ptr Timer control block pointer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
391 /* expiration_routine Timer expiration routine */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
392 /* initial_time Initial expiration time */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
393 /* reschedule_time Reschedule expiration time */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
394 /* enable Automatic enable option */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
395 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
396 /* OUTPUTS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
397 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
398 /* NU_NOT_DISABLED Timer not disabled first */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
399 /* NU_SUCCESS Successful completion */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
400 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
401 /* HISTORY */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
402 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
403 /* DATE REMARKS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
404 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
405 /* 03-01-1993 Created initial version 1.0 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
406 /* 04-19-1993 Verified version 1.0 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
407 /* 03-01-1994 Modified protection logic to use */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
408 /* system protection, changed */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
409 /* function prototype, resulting */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
410 /* in version 1.1 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
411 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
412 /* 03-18-1994 Verified version 1.1 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
413 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
414 /*************************************************************************/ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
415 STATUS TMS_Reset_Timer(NU_TIMER *timer_ptr, | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
416 VOID (*expiration_routine)(UNSIGNED), | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
417 UNSIGNED initial_time, UNSIGNED reschedule_time, OPTION enable) | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
418 { | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
419 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
420 R1 TM_APP_TCB *timer; /* Timer control block ptr */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
421 STATUS status; /* Completion status */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
422 NU_SUPERV_USER_VARIABLES | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
423 static char dbgstr[512]; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
424 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
425 sprintf(dbgstr, "* TMS_Reset_Timer(): timer_ptr=%08x, expiration_routine=%08x, initial_time=%x, reschedule_time=%x, enable=%x", | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
426 (unsigned)timer_ptr, (unsigned)expiration_routine, | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
427 (unsigned)initial_time, (unsigned)reschedule_time, | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
428 (unsigned)enable); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
429 freecalypso_raw_dbgout(dbgstr); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
430 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
431 /* Switch to supervisor mode */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
432 NU_SUPERVISOR_MODE(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
433 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
434 /* Move input timer pointer into internal pointer. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
435 timer = (TM_APP_TCB *) timer_ptr; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
436 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
437 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
438 #ifdef NU_ENABLE_STACK_CHECK | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
439 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
440 /* Call stack checking function to check for an overflow condition. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
441 TCT_Check_Stack(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
442 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
443 #endif | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
444 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
445 #ifdef NU_ENABLE_HISTORY | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
446 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
447 /* Make an entry that corresponds to this function in the system history | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
448 log. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
449 HIC_Make_History_Entry(NU_RESET_TIMER_ID, (UNSIGNED) timer, | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
450 (UNSIGNED) expiration_routine, (UNSIGNED) initial_time); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
451 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
452 #endif | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
453 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
454 /* Protect against access to the active timer list. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
455 TCT_System_Protect(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
456 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
457 /* Determine if this timer is active. An active timer cannot be | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
458 reset. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
459 if (timer -> tm_enabled) | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
460 { | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
461 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
462 /* Indicate that the timer is active by returning the proper status. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
463 status = NU_NOT_DISABLED; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
464 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
465 #ifdef INCLUDE_PROVIEW | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
466 _RTProf_DumpTimer(RT_PROF_RESET_TIMER,timer,RT_PROF_FAIL); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
467 #endif /* INCLUDE_PROVIEW */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
468 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
469 } | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
470 else | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
471 { | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
472 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
473 /* Load the timer with the appropriate values. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
474 timer -> tm_expiration_routine = expiration_routine; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
475 timer -> tm_expirations = 0; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
476 timer -> tm_initial_time = initial_time; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
477 timer -> tm_reschedule_time = reschedule_time; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
478 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
479 /* Indicate successful completion status. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
480 status = NU_SUCCESS; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
481 #ifdef INCLUDE_PROVIEW | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
482 _RTProf_DumpTimer(RT_PROF_RESET_TIMER,timer,RT_PROF_OK); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
483 #endif /* INCLUDE_PROVIEW */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
484 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
485 } | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
486 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
487 /* Release protection. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
488 TCT_Unprotect(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
489 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
490 /* Determine if the timer needs to be enabled. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
491 if ((status == NU_SUCCESS) && (enable == NU_ENABLE_TIMER)) | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
492 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
493 /* Activate the timer. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
494 TMS_Control_Timer(timer_ptr, NU_ENABLE_TIMER); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
495 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
496 /* Return to user mode */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
497 NU_USER_MODE(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
498 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
499 /* Return completion status. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
500 return(status); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
501 } | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
502 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
503 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
504 /*************************************************************************/ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
505 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
506 /* FUNCTION */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
507 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
508 /* TMS_Control_Timer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
509 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
510 /* DESCRIPTION */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
511 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
512 /* This function either enables or disables the specified timer. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
513 /* If the timer is already in the desired state, simply leave it */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
514 /* alone. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
515 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
516 /* CALLED BY */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
517 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
518 /* Application */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
519 /* TMSE_Control_Timer Error checking shell */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
520 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
521 /* CALLS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
522 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
523 /* [HIC_Make_History_Entry] Make entry in history log */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
524 /* [TCT_Check_Stack] Stack checking function */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
525 /* TCT_System_Protect Protect the active list */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
526 /* TCT_Unprotect Release protection */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
527 /* TMC_Start_Timer Start a timer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
528 /* TMC_Stop_Timer Stop a timer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
529 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
530 /* INPUTS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
531 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
532 /* app_timer Timer control block pointer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
533 /* enable Disable/enable timer option */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
534 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
535 /* OUTPUTS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
536 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
537 /* NU_SUCCESS If service is successful */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
538 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
539 /* HISTORY */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
540 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
541 /* DATE REMARKS */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
542 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
543 /* 03-01-1993 Created initial version 1.0 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
544 /* 04-19-1993 Verified version 1.0 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
545 /* 03-01-1994 Modified protection logic to use */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
546 /* system protection, changed */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
547 /* function prototype, resulting */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
548 /* in version 1.1 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
549 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
550 /* 03-18-1994 Verified version 1.1 */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
551 /* */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
552 /*************************************************************************/ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
553 STATUS TMS_Control_Timer(NU_TIMER *app_timer, OPTION enable) | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
554 { | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
555 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
556 R1 TM_APP_TCB *timer; /* Timer control block ptr */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
557 TM_TCB *timer_ptr; /* Actual timer pointer */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
558 UNSIGNED time; /* Variable to hold request */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
559 NU_SUPERV_USER_VARIABLES | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
560 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
561 /* Switch to supervisor mode */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
562 NU_SUPERVISOR_MODE(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
563 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
564 /* Move input timer pointer into internal pointer. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
565 timer = (TM_APP_TCB *) app_timer; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
566 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
567 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
568 #ifdef NU_ENABLE_STACK_CHECK | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
569 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
570 /* Call stack checking function to check for an overflow condition. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
571 TCT_Check_Stack(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
572 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
573 #endif | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
574 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
575 #ifdef NU_ENABLE_HISTORY | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
576 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
577 /* Make an entry that corresponds to this function in the system history | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
578 log. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
579 HIC_Make_History_Entry(NU_CONTROL_TIMER_ID, (UNSIGNED) timer, | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
580 (UNSIGNED) enable, (UNSIGNED) 0); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
581 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
582 #endif | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
583 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
584 /* Protect against simultaneous access to the active timer list. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
585 TCT_System_Protect(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
586 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
587 /* Setup pointer to actual timer part of the control block. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
588 timer_ptr = &(timer -> tm_actual_timer); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
589 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
590 /* Determine what type of request is present. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
591 if ((enable == NU_ENABLE_TIMER) && (!timer -> tm_enabled)) | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
592 { | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
593 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
594 /* Enable timer request is present and timer is currently disabled. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
595 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
596 /* Determine how to setup the remaining field in the actual timer. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
597 if (timer -> tm_expirations) | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
598 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
599 /* Use reschedule time since this timer has expired previously. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
600 time = timer -> tm_reschedule_time; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
601 else | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
602 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
603 /* Use initial time since this timer has never expired. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
604 time = timer -> tm_initial_time; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
605 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
606 /* Mark the application timer as enabled. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
607 timer -> tm_enabled = NU_TRUE; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
608 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
609 /* Call the start timer routine to actually start the timer. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
610 TMC_Start_Timer(&(timer -> tm_actual_timer), time); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
611 } | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
612 else if ((enable == NU_DISABLE_TIMER) && (timer -> tm_enabled)) | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
613 { | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
614 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
615 /* Disable timer request is present and timer is currently enabled. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
616 TMC_Stop_Timer(timer_ptr); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
617 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
618 /* Mark the timer as disabled. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
619 timer -> tm_enabled = NU_FALSE; | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
620 } | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
621 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
622 #ifdef INCLUDE_PROVIEW | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
623 _RTProf_DumpTimer(RT_PROF_CONTROL_TIMER,timer,RT_PROF_OK); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
624 #endif /* INCLUDE_PROVIEW */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
625 /* Release protection. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
626 TCT_Unprotect(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
627 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
628 /* Return to user mode */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
629 NU_USER_MODE(); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
630 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
631 /* Return the completion status. */ | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
632 return(NU_SUCCESS); | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
633 } | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
634 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
635 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
636 | 
| 
 
85994b210f6a
nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
637 | 
