Staging: csr: remove __cplusplus nonsense from the .h files
[firefly-linux-kernel-4.4.55.git] / drivers / staging / csr / csr_lib.h
1 #ifndef CSR_LIB_H__
2 #define CSR_LIB_H__
3 /*****************************************************************************
4
5             (c) Cambridge Silicon Radio Limited 2010
6             All rights reserved and confidential information of CSR
7
8             Refer to LICENSE.txt included with this source for details
9             on the license terms.
10
11 *****************************************************************************/
12
13 #include "csr_prim_defs.h"
14
15 typedef struct
16 {
17     CsrPrim type;
18 } CsrEvent;
19
20 /*----------------------------------------------------------------------------*
21  *  CsrEvent_struct
22  *
23  *  DESCRIPTION
24  *      Generic message creator.
25  *      Allocates and fills in a message with the signature CsrEvent
26  *
27  *----------------------------------------------------------------------------*/
28 CsrEvent *CsrEvent_struct(u16 primtype, u16 msgtype);
29
30 typedef struct
31 {
32     CsrPrim  type;
33     u8 value;
34 } CsrEventCsrUint8;
35
36 /*----------------------------------------------------------------------------*
37  *  CsrEventCsrUint8_struct
38  *
39  *  DESCRIPTION
40  *      Generic message creator.
41  *      Allocates and fills in a message with the signature CsrEventCsrUint8
42  *
43  *----------------------------------------------------------------------------*/
44 CsrEventCsrUint8 *CsrEventCsrUint8_struct(u16 primtype, u16 msgtype, u8 value);
45
46 typedef struct
47 {
48     CsrPrim   type;
49     u16 value;
50 } CsrEventCsrUint16;
51
52 /*----------------------------------------------------------------------------*
53  *  CsrEventCsrUint16_struct
54  *
55  *  DESCRIPTION
56  *      Generic message creator.
57  *      Allocates and fills in a message with the signature CsrEventCsrUint16
58  *
59  *----------------------------------------------------------------------------*/
60 CsrEventCsrUint16 *CsrEventCsrUint16_struct(u16 primtype, u16 msgtype, u16 value);
61
62 typedef struct
63 {
64     CsrPrim   type;
65     u16 value1;
66     u8  value2;
67 } CsrEventCsrUint16CsrUint8;
68
69 /*----------------------------------------------------------------------------*
70  *  CsrEventCsrUint16CsrUint8_struct
71  *
72  *  DESCRIPTION
73  *      Generic message creator.
74  *      Allocates and fills in a message with the signature CsrEventCsrUint16CsrUint8
75  *
76  *----------------------------------------------------------------------------*/
77 CsrEventCsrUint16CsrUint8 *CsrEventCsrUint16CsrUint8_struct(u16 primtype, u16 msgtype, u16 value1, u8 value2);
78
79 typedef struct
80 {
81     CsrPrim   type;
82     u16 value1;
83     u16 value2;
84 } CsrEventCsrUint16CsrUint16;
85
86 /*----------------------------------------------------------------------------*
87  *  CsrEventCsrUint16CsrUint16_struct
88  *
89  *  DESCRIPTION
90  *      Generic message creator.
91  *      Allocates and fills in a message with the signature CsrEventCsrUint16CsrUint16
92  *
93  *----------------------------------------------------------------------------*/
94 CsrEventCsrUint16CsrUint16 *CsrEventCsrUint16CsrUint16_struct(u16 primtype, u16 msgtype, u16 value1, u16 value2);
95
96 typedef struct
97 {
98     CsrPrim   type;
99     u16 value1;
100     u32 value2;
101 } CsrEventCsrUint16CsrUint32;
102
103 /*----------------------------------------------------------------------------*
104  *  CsrEventCsrUint16_struct
105  *
106  *  DESCRIPTION
107  *      Generic message creator.
108  *      Allocates and fills in a message with the signature CsrEventCsrUint16
109  *
110  *----------------------------------------------------------------------------*/
111 CsrEventCsrUint16CsrUint32 *CsrEventCsrUint16CsrUint32_struct(u16 primtype, u16 msgtype, u16 value1, u32 value2);
112
113 typedef struct
114 {
115     CsrPrim        type;
116     u16      value1;
117     char *value2;
118 } CsrEventCsrUint16CsrCharString;
119
120 /*----------------------------------------------------------------------------*
121  *  CsrEventCsrUint16CsrCharString_struct
122  *
123  *  DESCRIPTION
124  *      Generic message creator.
125  *      Allocates and fills in a message with the signature CsrEventCsrUint16CsrCharString
126  *
127  *----------------------------------------------------------------------------*/
128 CsrEventCsrUint16CsrCharString *CsrEventCsrUint16CsrCharString_struct(u16 primtype, u16 msgtype, u16 value1, char *value2);
129
130 typedef struct
131 {
132     CsrPrim   type;
133     u32 value;
134 } CsrEventCsrUint32;
135
136 /*----------------------------------------------------------------------------*
137  *  CsrEventCsrUint32_struct
138  *
139  *  DESCRIPTION
140  *      Generic message creator.
141  *      Allocates and fills in a message with the signature CsrEventCsrUint32
142  *
143  *----------------------------------------------------------------------------*/
144 CsrEventCsrUint32 *CsrEventCsrUint32_struct(u16 primtype, u16 msgtype, u32 value);
145
146 typedef struct
147 {
148     CsrPrim   type;
149     u32 value1;
150     u16 value2;
151 } CsrEventCsrUint32CsrUint16;
152
153 /*----------------------------------------------------------------------------*
154  *  CsrEventCsrUint32CsrUint16_struct
155  *
156  *  DESCRIPTION
157  *      Generic message creator.
158  *      Allocates and fills in a message with the signature CsrEventCsrUint32CsrUint16
159  *
160  *----------------------------------------------------------------------------*/
161 CsrEventCsrUint32CsrUint16 *CsrEventCsrUint32CsrUint16_struct(u16 primtype, u16 msgtype, u32 value1, u32 value2);
162
163 typedef struct
164 {
165     CsrPrim        type;
166     u32      value1;
167     char *value2;
168 } CsrEventCsrUint32CsrCharString;
169
170 /*----------------------------------------------------------------------------*
171  *  CsrEventCsrUint32CsrCharString_struct
172  *
173  *  DESCRIPTION
174  *      Generic message creator.
175  *      Allocates and fills in a message with the signature CsrEventCsrUint32CsrCharString
176  *
177  *----------------------------------------------------------------------------*/
178 CsrEventCsrUint32CsrCharString *CsrEventCsrUint32CsrCharString_struct(u16 primtype, u16 msgtype, u32 value1, char *value2);
179
180 #endif /* CSR_LIB_H__ */