0
|
1 |
/*
|
|
2 |
* public_event_mbox.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 |
FILENAME: public_event_mbox.h
|
|
42 |
|
|
43 |
DESCRIPTION: Public header for the Event Mailbox FW<->Driver interface
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
***********************************************************************************************************************/
|
|
48 |
#ifndef PUBLIC_EVENT_MBOX_H
|
|
49 |
#define PUBLIC_EVENT_MBOX_H
|
|
50 |
|
|
51 |
/******************************************************************************
|
|
52 |
|
|
53 |
EVENT MBOX
|
|
54 |
|
|
55 |
The event mechanism is based on a pair of event buffers (buffers "A" and "B") in fixed locations
|
|
56 |
in the device's memory. The host processes one buffer (buffer "A") while the other buffer
|
|
57 |
(buffer "B") continues to collect events. When the host is finished, it begins processing the
|
|
58 |
other buffer ("B") while the first buffer ("A") collects, and so on.
|
|
59 |
If the host is not processing events, an interrupt is issued to the host signaling that a
|
|
60 |
buffer is ready. The interrupt that the host receives indicates the appropriate event structure
|
|
61 |
buffer. Once the host finishes processing events from one buffer,
|
|
62 |
it signals with an acknowledge interrupt (bit 0 in the INT_TRIG register) that the event buffer
|
|
63 |
is free. This interrupt triggers the device to send the next event structure if there are any
|
|
64 |
collected events in it.
|
|
65 |
|
|
66 |
Note: Only one instance (the last) of each type of event is collected.
|
|
67 |
|
|
68 |
******************************************************************************/
|
|
69 |
|
|
70 |
|
|
71 |
#include "public_types.h"
|
|
72 |
#include "public_commands.h"
|
|
73 |
#include "public_infoele.h"
|
|
74 |
|
|
75 |
|
|
76 |
|
|
77 |
/*************************************************************************
|
|
78 |
|
|
79 |
Events Enumeration
|
|
80 |
|
|
81 |
**************************************************************************/
|
|
82 |
typedef enum
|
|
83 |
{
|
|
84 |
RSSI_SNR_TRIGGER_0_EVENT_ID = BIT_0,
|
|
85 |
RSSI_SNR_TRIGGER_1_EVENT_ID = BIT_1,
|
|
86 |
RSSI_SNR_TRIGGER_2_EVENT_ID = BIT_2,
|
|
87 |
RSSI_SNR_TRIGGER_3_EVENT_ID = BIT_3,
|
|
88 |
RSSI_SNR_TRIGGER_4_EVENT_ID = BIT_4,
|
|
89 |
RSSI_SNR_TRIGGER_5_EVENT_ID = BIT_5,
|
|
90 |
RSSI_SNR_TRIGGER_6_EVENT_ID = BIT_6,
|
|
91 |
RSSI_SNR_TRIGGER_7_EVENT_ID = BIT_7,
|
|
92 |
|
|
93 |
MEASUREMENT_START_EVENT_ID = BIT_8,
|
|
94 |
MEASUREMENT_COMPLETE_EVENT_ID = BIT_9,
|
|
95 |
SCAN_COMPLETE_EVENT_ID = BIT_10,
|
|
96 |
SCHEDULED_SCAN_COMPLETE_EVENT_ID = BIT_11,
|
|
97 |
AP_DISCOVERY_COMPLETE_EVENT_ID = BIT_12,
|
|
98 |
PS_REPORT_EVENT_ID = BIT_13,
|
|
99 |
PSPOLL_DELIVERY_FAILURE_EVENT_ID = BIT_14,
|
|
100 |
DISCONNECT_EVENT_COMPLETE_ID = BIT_15,
|
|
101 |
JOIN_EVENT_COMPLETE_ID = BIT_16,
|
|
102 |
CHANNEL_SWITCH_COMPLETE_EVENT_ID = BIT_17,
|
|
103 |
BSS_LOSE_EVENT_ID = BIT_18,
|
|
104 |
REGAINED_BSS_EVENT_ID = BIT_19,
|
|
105 |
ROAMING_TRIGGER_MAX_TX_RETRY_EVENT_ID = BIT_20,
|
|
106 |
RESERVED_21 = BIT_21,
|
|
107 |
SOFT_GEMINI_SENSE_EVENT_ID = BIT_22,
|
|
108 |
SOFT_GEMINI_PREDICTION_EVENT_ID = BIT_23,
|
|
109 |
SOFT_GEMINI_AVALANCHE_EVENT_ID = BIT_24,
|
|
110 |
PLT_RX_CALIBRATION_COMPLETE_EVENT_ID = BIT_25,
|
|
111 |
DBG_EVENT_ID = BIT_26,
|
|
112 |
HEALTH_CHECK_REPLY_EVENT_ID = BIT_27,
|
|
113 |
|
|
114 |
PERIODIC_SCAN_COMPLETE_EVENT_ID = BIT_28,
|
|
115 |
PERIODIC_SCAN_REPORT_EVENT_ID = BIT_29,
|
|
116 |
|
|
117 |
BA_SESSION_TEAR_DOWN_EVENT_ID = BIT_30,
|
|
118 |
|
|
119 |
EVENT_MBOX_ALL_EVENT_ID = MAX_POSITIVE32
|
|
120 |
} EventMBoxId_e;
|
|
121 |
|
|
122 |
/*************************************************************************
|
|
123 |
|
|
124 |
Specific Event Parameters
|
|
125 |
|
|
126 |
**************************************************************************/
|
|
127 |
typedef enum
|
|
128 |
{
|
|
129 |
SCHEDULED_SCAN_COMPLETED_OK = 0,
|
|
130 |
SCHEDULED_SCAN_TSF_ERROR = 1
|
|
131 |
} ScheduledScanReportStatus_enum;
|
|
132 |
|
|
133 |
|
|
134 |
typedef enum
|
|
135 |
{
|
|
136 |
CHANNEL_SWITCH_COMPLETE_OK,
|
|
137 |
CHANNEL_SWITCH_TSF_ERROR
|
|
138 |
} ChannelSwitchReportStatus_enum;
|
|
139 |
|
|
140 |
|
|
141 |
typedef enum
|
|
142 |
{
|
|
143 |
ENTER_POWER_SAVE_FAIL = 0,
|
|
144 |
ENTER_POWER_SAVE_SUCCESS = 1,
|
|
145 |
EXIT_POWER_SAVE_FAIL = 2,
|
|
146 |
EXIT_POWER_SAVE_SUCCESS = 3,
|
|
147 |
POWER_SAVE_STATUS_NUMBER
|
|
148 |
} EventsPowerSave_enum;
|
|
149 |
|
|
150 |
typedef enum
|
|
151 |
{
|
|
152 |
TEST1_DBG_EVENT_ID = 0,
|
|
153 |
TEST2_DBG_EVENT_ID = 0x11,
|
|
154 |
LAST_DBG_EVENT_ID= 0xff
|
|
155 |
}dbgEventId_enum;
|
|
156 |
|
|
157 |
#ifdef HOST_COMPILE
|
|
158 |
typedef uint8 ScheduledScanReportStatus_e;
|
|
159 |
typedef uint8 ChannelSwitchReportStatus_e;
|
|
160 |
typedef uint8 EventsPowerSave_e;
|
|
161 |
typedef uint8 dbgEventId_e;
|
|
162 |
#else
|
|
163 |
typedef ScheduledScanReportStatus_enum ScheduledScanReportStatus_e;
|
|
164 |
typedef ChannelSwitchReportStatus_enum ChannelSwitchReportStatus_e;
|
|
165 |
typedef EventsPowerSave_enum EventsPowerSave_e;
|
|
166 |
typedef dbgEventId_enum dbgEventId_e;
|
|
167 |
#endif
|
|
168 |
|
|
169 |
|
|
170 |
#define MAX_EVENT_REPORT_PARAMS 5
|
|
171 |
typedef struct
|
|
172 |
{
|
|
173 |
dbgEventId_e dbgEventId; /*uint8*/
|
|
174 |
uint8 numberOfRelevantParams;
|
|
175 |
uint16 reservedPad16;
|
|
176 |
uint32 eventReportP1;
|
|
177 |
uint32 eventReportP2;
|
|
178 |
uint32 eventReportP3;
|
|
179 |
}dbgEventRep_t;
|
|
180 |
|
|
181 |
typedef struct
|
|
182 |
{
|
|
183 |
uint8 numberOfScanResults; /* How many results were parsed */
|
|
184 |
uint8 scanTag; /* Tag of scan */
|
|
185 |
uint8 padding[2]; /* for alignment to 32 bits boundry*/
|
|
186 |
uint32 scheduledScanStatus; /* [0-7] scan completed status, [8-23] Attended Channels map, [24-31] reserved. */
|
|
187 |
} scanCompleteResults_t;
|
|
188 |
|
|
189 |
/*************************************************************************
|
|
190 |
|
|
191 |
The Event Mailbox structure in memory
|
|
192 |
|
|
193 |
**************************************************************************/
|
|
194 |
typedef struct EventMailBox_t
|
|
195 |
{
|
|
196 |
/* Events Bit Mask */
|
|
197 |
uint32 eventsVector;
|
|
198 |
uint32 eventsMask;
|
|
199 |
uint32 reserved1;
|
|
200 |
uint32 reserved2;
|
|
201 |
|
|
202 |
/* Events Data */
|
|
203 |
|
|
204 |
|
|
205 |
dbgEventRep_t dbgEventRep; /* refer to dbgEventRep_t*/
|
|
206 |
/* [DBG_EVENT_ID]*/
|
|
207 |
|
|
208 |
scanCompleteResults_t scanCompleteResults; /* Scan complete results (counter and scan tag) */
|
|
209 |
|
|
210 |
uint16 scheduledScanAttendedChannels; /* Channels scanned by the Scheduled Scan. */
|
|
211 |
/* [SCHEDULED_SCAN_COMPLETE_EVENT_ID]*/
|
|
212 |
|
|
213 |
uint8 softGeminiSenseInfo; /* Contains the type of the BT Coexistence sense event.*/
|
|
214 |
/* [SOFT_GEMINI_SENSE_EVENT_ID]*/
|
|
215 |
|
|
216 |
uint8 softGeminiProtectiveInfo; /* Contains information from the BT activity prediction */
|
|
217 |
/* machine [SOFT_GEMINI_PREDICTION_EVENT_ID]*/
|
|
218 |
|
|
219 |
int8 RSSISNRTriggerMetric[NUM_OF_RSSI_SNR_TRIGGERS]; /* RSSI and SNR Multiple Triggers Array */
|
|
220 |
/* machine [RSSI_SNR_TRIGGER_0-8_EVENT_ID]*/
|
|
221 |
|
|
222 |
uint8 channelSwitchStatus; /* Status of channel switch. Refer to*/
|
|
223 |
/* ChannelSwitchReportStatus_enum.*/
|
|
224 |
/* [CHANNEL_SWITCH_COMPLETE_EVENT_ID]*/
|
|
225 |
|
|
226 |
uint8 scheduledScanStatus; /* Status of scheduled scan. Refer to */
|
|
227 |
/* ScheduledScanReportStatus_enum.*/
|
|
228 |
/* [SCHEDULED_SCAN_COMPLETE_EVENT_ID]*/
|
|
229 |
|
|
230 |
uint8 psStatus; /* refer to EventsPowerSave_enum.*/
|
|
231 |
/* [PS_REPORT_EVENT_ID].*/
|
|
232 |
|
|
233 |
|
|
234 |
|
|
235 |
uint8 padding[29]; /* for alignment to 32 bits boundry*/
|
|
236 |
|
|
237 |
|
|
238 |
} EventMailBox_t;
|
|
239 |
|
|
240 |
#endif /* PUBLIC_EVENT_MBOX_H*/
|
|
241 |
|
|
242 |
|