0
|
1 |
/*
|
|
2 |
* TI_IPC_Api.h
|
|
3 |
*
|
|
4 |
* Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.
|
|
5 |
* All rights reserved.
|
|
6 |
*
|
|
7 |
* This program and the accompanying materials are made available under the
|
|
8 |
* terms of the Eclipse Public License v1.0 or BSD License which accompanies
|
|
9 |
* this distribution. The Eclipse Public License is available at
|
|
10 |
* http://www.eclipse.org/legal/epl-v10.html and the BSD License is as below.
|
|
11 |
*
|
|
12 |
* Redistribution and use in source and binary forms, with or without
|
|
13 |
* modification, are permitted provided that the following conditions
|
|
14 |
* are met:
|
|
15 |
*
|
|
16 |
* * Redistributions of source code must retain the above copyright
|
|
17 |
* notice, this list of conditions and the following disclaimer.
|
|
18 |
* * Redistributions in binary form must reproduce the above copyright
|
|
19 |
* notice, this list of conditions and the following disclaimer in
|
|
20 |
* the documentation and/or other materials provided with the
|
|
21 |
* distribution.
|
|
22 |
* * Neither the name Texas Instruments nor the names of its
|
|
23 |
* contributors may be used to endorse or promote products derived
|
|
24 |
* from this software without specific prior written permission.
|
|
25 |
*
|
|
26 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
27 |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
28 |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
29 |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
30 |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
31 |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
32 |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
33 |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
34 |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
35 |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
36 |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
37 |
*/
|
|
38 |
|
|
39 |
/*---------------------------------------------------------------*/
|
|
40 |
/**/
|
|
41 |
/* TI IPC header file*/
|
|
42 |
/**/
|
|
43 |
/* Author : Texas Instruments*/
|
|
44 |
/**/
|
|
45 |
/* Filename: TI_IPC_Api.h*/
|
|
46 |
/**/
|
|
47 |
/* Version :1.0*/
|
|
48 |
/**/
|
|
49 |
/* Last update date : 15/03/2004*/
|
|
50 |
/**/
|
|
51 |
/*---------------------------------------------------------------*/
|
|
52 |
|
|
53 |
#ifndef _TI_IPC_API_H
|
|
54 |
#define _TI_IPC_API_H
|
|
55 |
|
|
56 |
#include "tidef.h"
|
|
57 |
|
|
58 |
|
|
59 |
#define MAX_REGISTERED_MODULES 5
|
|
60 |
#define MAX_EVENT_DATA_SIZE 128
|
|
61 |
#define MAX_SEND_EVENTS 4
|
|
62 |
|
|
63 |
#ifdef __cplusplus
|
|
64 |
extern "C" {
|
|
65 |
#endif
|
|
66 |
|
|
67 |
/*******************Defines*********************/
|
|
68 |
|
|
69 |
/* WARNING! DON'T CHANGE THE ORDER OF EVENTS! */
|
|
70 |
/* OS EVENTS MUST COME FIRST!*/
|
|
71 |
|
|
72 |
enum
|
|
73 |
{
|
|
74 |
IPC_EVENT_ASSOCIATED = 0,
|
|
75 |
IPC_EVENT_DISASSOCIATED,
|
|
76 |
IPC_EVENT_LINK_SPEED,
|
|
77 |
IPC_EVENT_AUTH_SUCC,
|
|
78 |
IPC_EVENT_SCAN_COMPLETE,
|
|
79 |
IPC_EVENT_TIMEOUT,
|
|
80 |
IPC_EVENT_CCKM_START,
|
|
81 |
IPC_EVENT_MEDIA_SPECIFIC,
|
|
82 |
IPC_EVENT_MAX_OS_EVENT = IPC_EVENT_MEDIA_SPECIFIC,
|
|
83 |
IPC_EVENT_EAPOL,
|
|
84 |
IPC_EVENT_BOUND,
|
|
85 |
IPC_EVENT_UNBOUND,
|
|
86 |
IPC_EVENT_PREAUTH_EAPOL,
|
|
87 |
IPC_EVENT_RESERVED2,
|
|
88 |
IPC_EVENT_LOW_RSSI,
|
|
89 |
IPC_EVENT_TSPEC_STATUS,
|
|
90 |
IPC_EVENT_TSPEC_RATE_STATUS,
|
|
91 |
IPC_EVENT_MEDIUM_TIME_CROSS,
|
|
92 |
IPC_EVENT_ROAMING_COMPLETE,
|
|
93 |
IPC_EVENT_EAP_AUTH_FAILURE,
|
|
94 |
IPC_EVENT_WPA2_PREAUTHENTICATION,
|
|
95 |
IPC_EVENT_TRAFFIC_INTENSITY_THRESHOLD_CROSSED,
|
|
96 |
IPC_EVENT_GWSI,
|
|
97 |
IPC_EVENT_WPS_SESSION_OVERLAP,
|
|
98 |
IPC_EVENT_RSSI_SNR_TRIGGER_0,
|
|
99 |
IPC_EVENT_RSSI_SNR_TRIGGER_1,
|
|
100 |
IPC_EVENT_LOGGER,
|
|
101 |
IPC_EVENT_NOT_ASSOCIATED,
|
|
102 |
IPC_EVENT_MAX
|
|
103 |
};
|
|
104 |
|
|
105 |
enum
|
|
106 |
{
|
|
107 |
DELIVERY_PUSH =0,
|
|
108 |
DELIVERY_GET_DATA
|
|
109 |
};
|
|
110 |
|
|
111 |
/************************* IOCTLs Functions *******************************/
|
|
112 |
|
|
113 |
TI_HANDLE IPC_Init(void);
|
|
114 |
|
|
115 |
TI_INT32 IPC_DeInit(void);
|
|
116 |
|
|
117 |
TI_HANDLE IPC_DeviceOpen(void* AdapterName); /* get hDevice Handle*/
|
|
118 |
|
|
119 |
TI_INT32 IPC_DeviceClose(TI_HANDLE hDevice);
|
|
120 |
|
|
121 |
TI_INT32 IPC_DeviceIoControl(TI_HANDLE hDevice,
|
|
122 |
TI_UINT32 IoControlCode,
|
|
123 |
void* pInBuffer,
|
|
124 |
TI_UINT32 InBufferSize,
|
|
125 |
void* pOutBuffer,
|
|
126 |
TI_UINT32 pOutBufferSize,
|
|
127 |
TI_UINT32* pBytesReturned);
|
|
128 |
|
|
129 |
/************************* Events Functions *******************************/
|
|
130 |
|
|
131 |
typedef struct _IPC_EV_DATA * PIPC_EV_DATA;
|
|
132 |
|
|
133 |
typedef TI_INT32 (*TI_EVENT_CALLBACK) (PIPC_EV_DATA pData);
|
|
134 |
|
|
135 |
typedef struct _IPC_EVENT_PARAMS
|
|
136 |
{
|
|
137 |
TI_UINT32 uEventType;
|
|
138 |
TI_HANDLE uEventID;
|
|
139 |
TI_UINT32 uProcessID;
|
|
140 |
TI_UINT32 uDeliveryType;
|
|
141 |
TI_HANDLE hUserParam; /* Handle to back reference*/
|
|
142 |
TI_EVENT_CALLBACK pfEventCallback;
|
|
143 |
}IPC_EVENT_PARAMS;
|
|
144 |
|
|
145 |
/* EvParams are assumed to be the first field. Any addtions shoild be made
|
|
146 |
afterwards
|
|
147 |
*/
|
|
148 |
typedef struct _IPC_EV_DATA
|
|
149 |
{
|
|
150 |
IPC_EVENT_PARAMS EvParams;
|
|
151 |
TI_UINT32 uBufferSize;
|
|
152 |
TI_UINT8 uBuffer[MAX_EVENT_DATA_SIZE];
|
|
153 |
}IPC_EV_DATA;
|
|
154 |
|
|
155 |
|
|
156 |
/*this function will also enable event and pass all the parameters about it*/
|
|
157 |
/* returns unique ID of registered event, to be passed later for unregister*/
|
|
158 |
TI_INT32 IPC_RegisterEvent(TI_HANDLE hDevice, /* Driver Handle*/
|
|
159 |
IPC_EVENT_PARAMS* pEvParams); /* size of the structure + size of the params*/
|
|
160 |
|
|
161 |
TI_INT32 IPC_UnRegisterEvent(TI_HANDLE hDevice,
|
|
162 |
IPC_EVENT_PARAMS* pEvParams); /* returned by IPC_RegisterEvent*/
|
|
163 |
|
|
164 |
/***************************************************************************/
|
|
165 |
|
|
166 |
#ifdef __cplusplus
|
|
167 |
}
|
|
168 |
#endif
|
|
169 |
|
|
170 |
#endif /*_IPC_UTIL_H*/
|
|
171 |
|