comparison src/g23m-fad/tcpip/include/rvf_target.h @ 1:fa8dc04885d8

src/g23m-*: import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 16 Oct 2020 06:25:50 +0000
parents
children
comparison
equal deleted inserted replaced
0:4e78acac3d88 1:fa8dc04885d8
1 /****************************************************************************/
2 /* */
3 /* Name rvf_target.h */
4 /* */
5 /* Function this file contains definitions that will probably */
6 /* change for each target system. This includes */
7 /* such things number of tasks, */
8 /* little endian/big endian conversions, etc... */
9 /* */
10 /* */
11 /* NOTE This file should always be included first. */
12 /* */
13 /* Version 0.1 */
14 /* */
15 /* Date Modification */
16 /* ------------------------------------ */
17 /* 4/19/1999 Create */
18 /* 10/27/1999 remove declaration of ntohs, htons, ntohl, htonl */
19 /* in order to avoid conflict with winsock.h */
20 /* 12/23/1999 add buffer and memory bank related definition */
21 /* 07/12/2000 implement dynamic memory allocation. */
22 /* */
23 /* Author David Lamy-Charrier (dlamy@tif.ti.com) */
24 /* */
25 /* (C) Copyright 1999 by Texas Instruments Incorporated, All Rights Reserved*/
26 /****************************************************************************/
27 #ifndef _RVF_TARGET_H
28 #define _RVF_TARGET_H
29
30 #ifndef _SIMULATION_
31 #include "rv.cfg"
32 #include "swconfig.cfg"
33 #endif
34
35 /* optimizations */
36 #ifdef _WINDOWS
37 #define INLINE __inline
38 #else
39 #define INLINE inline
40 #endif
41
42 /*----------------------------------------------------------------------*/
43 /* RVF Definitions */
44 /*----------------------------------------------------------------------*/
45
46 /* the maximum number of memory bank created by users */
47 #if (!GSMLITE)
48 #define RVF_MAX_TOTAL_MB 70
49 #else // GSMLITE
50 #define RVF_MAX_TOTAL_MB 18
51 #endif // GSMLITE
52
53 /* the maximum number of real memory bank managed */
54 #if (!GSMLITE)
55 #define RVF_MAX_REAL_MB 60
56 #else // GSMLITE
57 #define RVF_MAX_REAL_MB 18
58 #endif // GSMLITE
59
60 /* max length of memory bank name */
61 #define RVF_MAX_MB_LEN 10
62
63 /* max length of task name */
64 #define RVF_MAX_TASK_LEN 10
65
66 /* RVF_MB_MAPPING defines the correspondance between mb_name and mb_id */
67 /* WARNING!!!! When adding new memory banks in this default list, take care */
68 /* to always finish with the {0,0} !!! */
69 #if (!GSMLITE)
70 #define RVF_MB_MAPPING {{ "RVM_PRIM", 0},{ "TEST1", 1}, { "TEST2", 2},\
71 { "TEST3", 3}, { "TEST4", 3},{"HCI_RX", 4},{"HCI_TX", 5},\
72 {"L2CAP_PRIM", 6},{"L2CAP_RX", 7},{"L2CAP_TX", 8},{"SPP_TX", 9},\
73 {"SPP_RX", 10},{"SPP_PRIM", 11},{"BTCTRL", 12},{"RV_TRACE", TRACE_MB_ID},\
74 {"RFC_TX", 13},{"RFC_PRIM", 14},{"RFC_01_RX", 15},{"RFC_02_RX", 16},\
75 {"RFC_03_RX", 17},{"RFC_04_RX", 18},{"RFC_05_RX", 20}, {"APP1_RX", 21},\
76 {"APP1_TX", 22},{"APP1_PRIM", 23}, {"SDP_PRIM", 24}, {"SDP_RX", 25}, \
77 {"SDP_TX", 26}, \
78 {"ATP_PRIM",27},{"ATP_UART",27},{"HSG_PRIM",28},{"HSG_TX",29},{"HSG_RX",30},\
79 {"HS_PRIM",28},{"HS_TX",29},{"HS_RX",30},\
80 {"RVMMI_PRIM",31},{"RVMMI_TX",32},{"RVMMI_RX",33},\
81 {"UWIRE_PRIM",37},\
82 {"DUN_PRIM",28},{"DUN_TX",29},{"DUN_RX",30},\
83 {"FAX_PRIM",28},{"FAX_TX",29},{"FAX_RX",30},{0,0}}
84 #else // GSMLITE
85 #define RVF_MB_MAPPING {{ "RVM_PRIM", 0},{ "TEST1", 1}, { "TEST2", 2},\
86 { "TEST3", 3}, { "TEST4", 3}, {0,0}}
87 #endif // GSMLITE
88
89 /* set the following variable to 1 to check for buffer corruption*/
90 #define RVF_ENABLE_BUF_CORRUPTION_CHECK 1
91
92 /* set the following variable to 1 to check for buffer linkage*/
93 #define RVF_ENABLE_BUF_LINKAGE_CHECK 1
94
95 /* enable or disable memory statistics functions */
96 #define RVF_ENABLE_STATS 1
97
98 /* The maximum number of RVF tasks allowed in the system*/
99 #if (!GSMLITE)
100 #define MAX_RVF_TASKS 20
101 #else // GSMLITE
102 #define MAX_RVF_TASKS 9
103 #endif // GSMLITE
104
105 /* max number of callback functions for buffers waiting to be counted on another memory bank */
106 #if (!GSMLITE)
107 #define RVF_MAX_WAITING_BUF 300
108 #else // GSMLITE
109 #define RVF_MAX_WAITING_BUF 20
110 #endif // GSMLITE
111 /* sum of RVF_BUFi_MAX */
112
113 /***********************************************************************
114 ** Timer related definitions. These should be edited per system. The
115 ** macros should convert milliseconds and seconds to system ticks.
116 ** Applications should use these to calculate the number of ticks to
117 ** sleep for.
118 */
119
120 #ifdef _WINDOWS
121 #define RVF_MS_TO_TICKS(x) (x / 50)
122 #define RVF_SECS_TO_TICKS(x) ((x * 1000) / 50)
123 #define RVF_TICKS_TO_MS(x) (x * 50)
124 #else
125 #define RVF_MS_TO_TICKS(x) (x /5)
126 #define RVF_SECS_TO_TICKS(x) ((x * 1000) /5)
127 #define RVF_TICKS_TO_MS(x) (x * 5)
128 #endif
129
130 #endif /* _RVF_TARGET_H */
131