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 13#include "csr_wifi_fsm_event.h" 14 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 *----------------------------------------------------------------------------*/ 36CsrWifiFsmEvent* CsrWifiEvent_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src); 37 38typedef struct 39{ 40 CsrWifiFsmEvent common; 41 u8 value; 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 *----------------------------------------------------------------------------*/ 52CsrWifiEventCsrUint8* CsrWifiEventCsrUint8_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u8 value); 53 54typedef struct 55{ 56 CsrWifiFsmEvent common; 57 u16 value; 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 *----------------------------------------------------------------------------*/ 68CsrWifiEventCsrUint16* CsrWifiEventCsrUint16_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u16 value); 69 70typedef struct 71{ 72 CsrWifiFsmEvent common; 73 u32 value; 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 *----------------------------------------------------------------------------*/ 84CsrWifiEventCsrUint32* CsrWifiEventCsrUint32_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u32 value); 85 86typedef struct 87{ 88 CsrWifiFsmEvent common; 89 u16 value16; 90 u8 value8; 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 *----------------------------------------------------------------------------*/ 101CsrWifiEventCsrUint16CsrUint8* CsrWifiEventCsrUint16CsrUint8_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u16 value16, u8 value8); 102 103#endif /* CSR_WIFI_LIB_H__ */ 104