FreeCalypso > hg > fc-tourmaline
comparison src/cs/riviera/rv/rv_general.h @ 0:4e78acac3d88
src/{condat,cs,gpf,nucleus}: import from Selenite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 16 Oct 2020 06:23:26 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4e78acac3d88 |
---|---|
1 /** | |
2 * @file rv_general.h | |
3 * | |
4 * Definitions that are shared between S/W entities | |
5 * in the Riviera Environment. | |
6 * | |
7 * @author David Lamy-Charrier (d-lamy@ti.com) | |
8 * @version 0.1 | |
9 */ | |
10 | |
11 /* | |
12 * Revision History: | |
13 * | |
14 * Date Author Modification | |
15 * ------------------------------------------------------------------- | |
16 * 03/12/1999 Create. | |
17 * 12/03/1999 Christian Livadiotti Replaced: | |
18 * #define ARRAY_TO_STREAM(p, a, l) {register int i; for | |
19 * (i = 0; i < l; i++) *p++ = (UINT8) a[i];} | |
20 * by the following to change convention of array writing. | |
21 * 12/08/1999 Pascal Pompei Add STREAM_TO_ARRAY | |
22 * 11/20/2001 Vincent Oberle - Changed T_RV_RETURN to T_RV_RETURN_PATH | |
23 * Keep compatibility with a define | |
24 * - Documentation cleaning | |
25 * 06/03/2002 Vincent Oberle Added __RV_CRITICAL | |
26 * | |
27 * (C) Copyright 2002 by Texas Instruments Incorporated, All Rights Reserved | |
28 */ | |
29 #ifndef _RV_GENERAL_H_ | |
30 #define _RV_GENERAL_H_ | |
31 | |
32 #include "rv/general.h" | |
33 #include "rv/rv_trace.h" | |
34 | |
35 /** | |
36 * Task IDentifiers: A-M-E-N-D-E-D! | |
37 * 0: Reserved for RVM, | |
38 * RVTEST_MENU_TASK_ID: 'Test Selection Menu', | |
39 * DUMMY_TASK_ID: 'Dummy' task. | |
40 * MAX - 1: Trace task (refer to rvf_target.h). | |
41 */ | |
42 #define RVTEST_MENU_TASK_ID (0x0A) | |
43 #define DUMMY_TASK_ID (0x0B) | |
44 | |
45 | |
46 | |
47 /** | |
48 * Returned parameter values. [Perhaps, a memory level WARNING could be added] */ | |
49 typedef enum { | |
50 RV_OK = 0, | |
51 RV_NOT_SUPPORTED = -2, | |
52 RV_NOT_READY = -3, | |
53 RV_MEMORY_WARNING = -4, | |
54 RV_MEMORY_ERR = -5, | |
55 RV_MEMORY_REMAINING = -6, | |
56 RV_INTERNAL_ERR = -9, | |
57 RV_INVALID_PARAMETER = -10 | |
58 } T_RV_RET; | |
59 | |
60 | |
61 /** | |
62 * Unique ADDRess IDentifier of any SWE. (T_RVF_ADDR_ID is deprecated) | |
63 */ | |
64 typedef UINT8 T_RVF_G_ADDR_ID; | |
65 #define T_RVF_ADDR_ID T_RVF_G_ADDR_ID | |
66 | |
67 | |
68 /** | |
69 * Return path type. | |
70 * | |
71 * T_RV_RETURN_PATH is the new name for the return path type. | |
72 * It is introduced to avoid the confusion with the return value | |
73 * type. Use this one. | |
74 */ | |
75 typedef struct | |
76 { | |
77 T_RVF_ADDR_ID addr_id; | |
78 void (*callback_func)(void *); | |
79 } T_RV_RETURN_PATH; | |
80 | |
81 // Deprecated. For backward compatibility only. | |
82 #define T_RV_RETURN T_RV_RETURN_PATH | |
83 | |
84 | |
85 /** | |
86 * Mark used to indicate that a function should be loadable. | |
87 * For instance: | |
88 * char __RV_CRITICAL xxx_do_something (char toto, int bill) { | |
89 * .. | |
90 */ | |
91 #ifndef __RV_CRITICAL | |
92 #define __RV_CRITICAL | |
93 #endif | |
94 | |
95 | |
96 /** | |
97 * Generic header of messages used in Riviera. | |
98 */ | |
99 typedef struct { | |
100 UINT32 msg_id; | |
101 void (*callback_func)(void *); | |
102 T_RVF_ADDR_ID src_addr_id; | |
103 T_RVF_ADDR_ID dest_addr_id; | |
104 } T_RV_HDR; | |
105 | |
106 #define RV_HDR_SIZE (sizeof (T_RV_HDR)) | |
107 | |
108 /** | |
109 * Macros to get minimum and maximum between 2 numbers. | |
110 */ | |
111 #define Min(a,b) ((a)<(b)?(a):(b)) | |
112 #define Max(a,b) ((a)<(b)?(b):(a)) | |
113 | |
114 | |
115 /** | |
116 * Macro to get minimum between 3 numbers. | |
117 */ | |
118 #define Min3(a,b,c) (Min(Min(a,b),c)) | |
119 | |
120 // Pointer type used to handle received data that L2CAP set in a chained buffer list. | |
121 typedef UINT8 T_RV_BUFFER; | |
122 | |
123 #endif /* _RV_GENERAL_H_ */ | |
124 |