1 /*****************************************************************************
3 (c) Cambridge Silicon Radio Limited 2011
4 All rights reserved and confidential information of CSR
6 Refer to LICENSE.txt included with this source for details
9 *****************************************************************************/
10 #ifndef CSR_WIFI_LIB_H__
11 #define CSR_WIFI_LIB_H__
13 #include "csr_wifi_fsm_event.h"
15 /*----------------------------------------------------------------------------*
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; \
28 /*----------------------------------------------------------------------------*
32 * Generic message creator.
33 * Allocates and fills in a message with the signature CsrWifiEvent
35 *----------------------------------------------------------------------------*/
36 CsrWifiFsmEvent* CsrWifiEvent_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src);
40 CsrWifiFsmEvent common;
42 } CsrWifiEventCsrUint8;
44 /*----------------------------------------------------------------------------*
45 * CsrWifiEventCsrUint8_struct
48 * Generic message creator.
49 * Allocates and fills in a message with the signature CsrWifiEventCsrUint8
51 *----------------------------------------------------------------------------*/
52 CsrWifiEventCsrUint8* CsrWifiEventCsrUint8_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u8 value);
56 CsrWifiFsmEvent common;
58 } CsrWifiEventCsrUint16;
60 /*----------------------------------------------------------------------------*
61 * CsrWifiEventCsrUint16_struct
64 * Generic message creator.
65 * Allocates and fills in a message with the signature CsrWifiEventCsrUint16
67 *----------------------------------------------------------------------------*/
68 CsrWifiEventCsrUint16* CsrWifiEventCsrUint16_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u16 value);
72 CsrWifiFsmEvent common;
74 } CsrWifiEventCsrUint32;
76 /*----------------------------------------------------------------------------*
77 * CsrWifiEventCsrUint32_struct
80 * Generic message creator.
81 * Allocates and fills in a message with the signature CsrWifiEventCsrUint32
83 *----------------------------------------------------------------------------*/
84 CsrWifiEventCsrUint32* CsrWifiEventCsrUint32_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u32 value);
88 CsrWifiFsmEvent common;
91 } CsrWifiEventCsrUint16CsrUint8;
93 /*----------------------------------------------------------------------------*
94 * CsrWifiEventCsrUint16CsrUint8_struct
97 * Generic message creator.
98 * Allocates and fills in a message with the signature CsrWifiEventCsrUint16CsrUint8
100 *----------------------------------------------------------------------------*/
101 CsrWifiEventCsrUint16CsrUint8* CsrWifiEventCsrUint16CsrUint8_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u16 value16, u8 value8);
103 #endif /* CSR_WIFI_LIB_H__ */