FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/L1/cust0/ind_os.c @ 520:ed6071292a5c
L1: first C module compiles: ind_os.c
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Thu, 10 Jul 2014 15:49:38 +0000 |
parents | ffbb71ee664c |
children | a6ff7b513bcf |
comparison
equal
deleted
inserted
replaced
519:57ad8f4d5cb5 | 520:ed6071292a5c |
---|---|
30 //#if ((ANALOG == 1) || (ANALOG == 2)) | 30 //#if ((ANALOG == 1) || (ANALOG == 2)) |
31 // #include "spi_drv.h" | 31 // #include "spi_drv.h" |
32 //#endif | 32 //#endif |
33 | 33 |
34 #if TESTMODE | 34 #if TESTMODE |
35 #include "l1tm_defty.h" | 35 #include "../tm_include/l1tm_defty.h" |
36 #endif | 36 #endif |
37 | 37 |
38 #include "l1audio_const.h" | 38 #include "../audio_include/l1audio_const.h" |
39 #include "l1audio_cust.h" | 39 #include "../audio_cust0/l1audio_cust.h" |
40 #include "l1audio_defty.h" | 40 #include "../audio_include/l1audio_defty.h" |
41 #include "l1_defty.h" | 41 #include "../include/l1_defty.h" |
42 #include "l1_msgty.h" | 42 #include "../include/l1_msgty.h" |
43 #include "l1_varex.h" | 43 #include "../include/l1_varex.h" |
44 | 44 |
45 #if (CHIPSET == 2 || CHIPSET == 3 || CHIPSET == 4 || CHIPSET == 5 || CHIPSET == 6 || CHIPSET == 7 || CHIPSET == 8 || CHIPSET == 10 || CHIPSET == 11 || CHIPSET == 12) | 45 #if (CHIPSET == 2 || CHIPSET == 3 || CHIPSET == 4 || CHIPSET == 5 || CHIPSET == 6 || CHIPSET == 7 || CHIPSET == 8 || CHIPSET == 10 || CHIPSET == 11 || CHIPSET == 12) |
46 #include "ulpd.h" | 46 #include "../../bsp/ulpd.h" |
47 #endif | 47 #endif |
48 | 48 |
49 extern UWORD32 TCD_Priority_Groups; | 49 extern UWORD32 TCD_Priority_Groups; |
50 extern TC_HCB *TCD_Active_HISR_Heads[TC_HISR_PRIORITIES]; | 50 extern TC_HCB *TCD_Active_HISR_Heads[TC_HISR_PRIORITIES]; |
51 extern VOID *TCD_Current_Thread; | 51 extern VOID *TCD_Current_Thread; |
71 return OS_OK; | 71 return OS_OK; |
72 } | 72 } |
73 | 73 |
74 | 74 |
75 /*-------------------------------------------------------*/ | 75 /*-------------------------------------------------------*/ |
76 /* int OS_get_inactivity_ticks() */ | 76 /* int OS_get_inactivity_ticks() */ |
77 /*-------------------------------------------------------*/ | 77 /*-------------------------------------------------------*/ |
78 /* Parameters : none */ | 78 /* Parameters : none */ |
79 /* Return : Number of ticks of inactivity */ | 79 /* Return : Number of ticks of inactivity */ |
80 /* 0 means immediate activity planned */ | 80 /* 0 means immediate activity planned */ |
81 /* -1 means no activity planned */ | 81 /* -1 means no activity planned */ |
121 if (TMD_Timer <= MIN_SLEEP_TIME) | 121 if (TMD_Timer <= MIN_SLEEP_TIME) |
122 return(0); | 122 return(0); |
123 else | 123 else |
124 return TMD_Timer; | 124 return TMD_Timer; |
125 } | 125 } |
126 | 126 |
127 // Returns not activity if no timer active | 127 // Returns not activity if no timer active |
128 if (TMD_Timer_State == TM_NOT_ACTIVE) | 128 if (TMD_Timer_State == TM_NOT_ACTIVE) |
129 return -1; | 129 return -1; |
130 else | 130 else |
131 // otherwise, returns immediate activity if a timer is expired (TM_EXPIRED) | 131 // otherwise, returns immediate activity if a timer is expired (TM_EXPIRED) |
141 /* 0 if no protection */ | 141 /* 0 if no protection */ |
142 /* Functionality : Checks whether the system structures */ | 142 /* Functionality : Checks whether the system structures */ |
143 /* are already protected or not */ | 143 /* are already protected or not */ |
144 /*-------------------------------------------------------*/ | 144 /*-------------------------------------------------------*/ |
145 void OS_system_protect (void) | 145 void OS_system_protect (void) |
146 { | 146 { |
147 NU_Protect((NU_PROTECT*) &TCD_System_Protect); | 147 NU_Protect((NU_PROTECT*) &TCD_System_Protect); |
148 } | 148 } |
149 | 149 |
150 /*-------------------------------------------------------*/ | 150 /*-------------------------------------------------------*/ |
151 /* int OS_system_Unprotect() */ | 151 /* int OS_system_Unprotect() */ |
152 /*-------------------------------------------------------*/ | 152 /*-------------------------------------------------------*/ |
153 /* Parameters : none */ | 153 /* Parameters : none */ |
154 /* Return : */ | 154 /* Return : */ |
155 /* Functionality : unprotect the system structures */ | 155 /* Functionality : unprotect the system structures */ |
156 /*-------------------------------------------------------*/ | 156 /*-------------------------------------------------------*/ |
157 void OS_system_Unprotect (void) | 157 void OS_system_Unprotect (void) |
158 { | 158 { |
159 NU_Unprotect(); | 159 NU_Unprotect(); |
160 } | 160 } |