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