Commit | Line | Data |
---|---|---|
635d2b00 GKH |
1 | /***************************************************************************** |
2 | ||
3 | (c) Cambridge Silicon Radio Limited 2011 | |
4 | All rights reserved and confidential information of CSR | |
5 | ||
6 | Refer to LICENSE.txt included with this source for details | |
7 | on the license terms. | |
8 | ||
9 | *****************************************************************************/ | |
10 | #ifndef CSR_WIFI_LIB_H__ | |
11 | #define CSR_WIFI_LIB_H__ | |
12 | ||
635d2b00 GKH |
13 | #include "csr_wifi_fsm_event.h" |
14 | ||
635d2b00 GKH |
15 | /*----------------------------------------------------------------------------* |
16 | * CsrWifiFsmEventInit | |
17 | * | |
18 | * DESCRIPTION | |
19 | * Macro to initialise the members of a CsrWifiFsmEvent. | |
20 | *----------------------------------------------------------------------------*/ | |
21 | #define CsrWifiFsmEventInit(evt, p_primtype, p_msgtype, p_dst, p_src) \ | |
22 | (evt)->primtype = p_primtype; \ | |
23 | (evt)->type = p_msgtype; \ | |
24 | (evt)->destination = p_dst; \ | |
25 | (evt)->source = p_src | |
26 | ||
27 | ||
28 | /*----------------------------------------------------------------------------* | |
29 | * CsrWifiEvent_struct | |
30 | * | |
31 | * DESCRIPTION | |
32 | * Generic message creator. | |
33 | * Allocates and fills in a message with the signature CsrWifiEvent | |
34 | * | |
35 | *----------------------------------------------------------------------------*/ | |
8c87f69a | 36 | CsrWifiFsmEvent* CsrWifiEvent_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src); |
635d2b00 GKH |
37 | |
38 | typedef struct | |
39 | { | |
40 | CsrWifiFsmEvent common; | |
7e6f5794 | 41 | u8 value; |
635d2b00 GKH |
42 | } CsrWifiEventCsrUint8; |
43 | ||
44 | /*----------------------------------------------------------------------------* | |
45 | * CsrWifiEventCsrUint8_struct | |
46 | * | |
47 | * DESCRIPTION | |
48 | * Generic message creator. | |
49 | * Allocates and fills in a message with the signature CsrWifiEventCsrUint8 | |
50 | * | |
51 | *----------------------------------------------------------------------------*/ | |
8c87f69a | 52 | CsrWifiEventCsrUint8* CsrWifiEventCsrUint8_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u8 value); |
635d2b00 GKH |
53 | |
54 | typedef struct | |
55 | { | |
56 | CsrWifiFsmEvent common; | |
8c87f69a | 57 | u16 value; |
635d2b00 GKH |
58 | } CsrWifiEventCsrUint16; |
59 | ||
60 | /*----------------------------------------------------------------------------* | |
61 | * CsrWifiEventCsrUint16_struct | |
62 | * | |
63 | * DESCRIPTION | |
64 | * Generic message creator. | |
65 | * Allocates and fills in a message with the signature CsrWifiEventCsrUint16 | |
66 | * | |
67 | *----------------------------------------------------------------------------*/ | |
8c87f69a | 68 | CsrWifiEventCsrUint16* CsrWifiEventCsrUint16_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u16 value); |
635d2b00 GKH |
69 | |
70 | typedef struct | |
71 | { | |
72 | CsrWifiFsmEvent common; | |
26a6b2e1 | 73 | u32 value; |
635d2b00 GKH |
74 | } CsrWifiEventCsrUint32; |
75 | ||
76 | /*----------------------------------------------------------------------------* | |
77 | * CsrWifiEventCsrUint32_struct | |
78 | * | |
79 | * DESCRIPTION | |
80 | * Generic message creator. | |
81 | * Allocates and fills in a message with the signature CsrWifiEventCsrUint32 | |
82 | * | |
83 | *----------------------------------------------------------------------------*/ | |
26a6b2e1 | 84 | CsrWifiEventCsrUint32* CsrWifiEventCsrUint32_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u32 value); |
635d2b00 GKH |
85 | |
86 | typedef struct | |
87 | { | |
88 | CsrWifiFsmEvent common; | |
8c87f69a | 89 | u16 value16; |
7e6f5794 | 90 | u8 value8; |
635d2b00 GKH |
91 | } CsrWifiEventCsrUint16CsrUint8; |
92 | ||
93 | /*----------------------------------------------------------------------------* | |
94 | * CsrWifiEventCsrUint16CsrUint8_struct | |
95 | * | |
96 | * DESCRIPTION | |
97 | * Generic message creator. | |
98 | * Allocates and fills in a message with the signature CsrWifiEventCsrUint16CsrUint8 | |
99 | * | |
100 | *----------------------------------------------------------------------------*/ | |
8c87f69a | 101 | CsrWifiEventCsrUint16CsrUint8* CsrWifiEventCsrUint16CsrUint8_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u16 value16, u8 value8); |
635d2b00 | 102 | |
635d2b00 | 103 | #endif /* CSR_WIFI_LIB_H__ */ |