FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/gpf/inc/os_const.h @ 316:79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Thu, 10 Apr 2014 04:06:05 +0000 |
parents | |
children | 06ee56829697 |
rev | line source |
---|---|
316
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /* |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 +------------------------------------------------------------------------------ |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 | File: os_const.h |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 +------------------------------------------------------------------------------ |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 | Copyright 2002 Texas Instruments Berlin, AG |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 | All rights reserved. |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 | |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 | This file is confidential and a trade secret of Texas |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 | Instruments Berlin, AG |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 | The receipt of or possession of this file does not convey |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 | any rights to reproduce or disclose its contents or to |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 | manufacture, use, or sell anything it may describe, in |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 | whole, or in part, without the specific written consent of |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 | Texas Instruments Berlin, AG. |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 +----------------------------------------------------------------------------- |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 | Purpose : Constants for the Nucleus OS-Layer |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 +----------------------------------------------------------------------------- |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 */ |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 #ifndef OS_CONST_H |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 #define OS_CONST_H |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 /*==== INCLUDES =============================================================*/ |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 /*==== CONSTS ===============================================================*/ |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 #define PTR_OVERHEAD 8 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 #ifdef MEMORY_SUPERVISION |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 #define PPM_CHKOVERHEAD 4 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 #define PPM_OVERHEAD (4+PPM_CHKOVERHEAD) |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 #define PPM_IDX_OFFSET 0 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 #else |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 #define PPM_CHKOVERHEAD 0 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 #define PPM_OVERHEAD 0 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 #endif |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 #ifdef NU_DEBUG |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 #define PT_CHKOVERHEAD 4 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 #else |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 #define PT_CHKOVERHEAD 0 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 #endif |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 #define PT_OVERHEAD (PTR_OVERHEAD+PPM_OVERHEAD) |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 #define POOL_OVERHEAD 0 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 #define PPM_OFFSET ((PPM_OVERHEAD-PPM_CHKOVERHEAD)/sizeof(ULONG)) |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 #define SUSPEND_ONE_TICK 1 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 #define TDMA_FRAME_DURATION 4.615 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 #define WIN32_TIMER_TICK 50 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 #define NO_WAIT_CHECK 0 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 #define WAIT_CHECK 1 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 #define OS_SUSPEND 0xffffffffUL /*NU_SUSPEND*/ |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 #define OS_NO_SUSPEND 0 /*NU_NO_SUSPEND*/ |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 #define OS_FOREVER 0xffffffffUL /*NU_SUSPEND*/ |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 #define TIME_TO_TICK_TDMA_FRAME_MULTIPLIER 14199 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 #define TICK_TO_TIME_TDMA_FRAME_MULTIPLIER 302483 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 #define TIME_TO_TICK_10MS_MULTIPLIER 6554 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 #define TICK_TO_TIME_10MS_MULTIPLIER 655319 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 #ifdef _TARGET_ |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 #define TIME_TO_SYSTEM_TICKS(time) (((((time)&0xffff)*os_time_to_tick_multiplier+0x8000)>>16)\ |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 +(((time)>>16)*os_time_to_tick_multiplier)) |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 #define SYSTEM_TICKS_TO_TIME(ticks) (((((ticks)&0xfff)*os_tick_to_time_multiplier+0x8000)>>16)\ |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 +((((ticks)>>12)*os_tick_to_time_multiplier)>>4)) |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 #else |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 #define TIME_TO_SYSTEM_TICKS(Time) ((Time)/WIN32_TIMER_TICK) |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 #define SYSTEM_TICKS_TO_TIME(Ticks) ((Ticks)*WIN32_TIMER_TICK) |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 #endif |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 #define OS_QUEUE_ENTRY_SIZE(E) (((E)*(sizeof(OS_QDATA)+sizeof(void*)) + (OS_MAX_PRIORITY * (((E)+1)*sizeof(void*))))) |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 #define POOL_SIZE(n,s) ((n*(s+PT_CHKOVERHEAD+PT_OVERHEAD))) |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 /* to avoid changes in all xxxconst.h files even if they do not use events */ |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 #ifndef MAX_EVENT_GROUPS |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 #define MAX_EVENT_GROUPS 1 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 #endif |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 /*==== TYPES =================================================================*/ |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
87 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
88 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
89 /*==== EXPORTS ===============================================================*/ |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
90 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 |
79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
92 #endif /* OS_CONST_H */ |