|
1 /* |
|
2 * FwEvent.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 /** \file FwEvent.h |
|
41 * \brief FwEvent internal defenitions |
|
42 * |
|
43 * \see FwEvent.c |
|
44 */ |
|
45 |
|
46 #ifndef _FW_EVENT_ |
|
47 #define _FW_EVENT_ |
|
48 |
|
49 #include "FwEvent_api.h" |
|
50 #include "TwIf.h" |
|
51 #include "public_host_int.h" |
|
52 |
|
53 |
|
54 #define ALL_EVENTS_VECTOR ACX_INTR_WATCHDOG | ACX_INTR_INIT_COMPLETE | ACX_INTR_EVENT_A |\ |
|
55 ACX_INTR_EVENT_B | ACX_INTR_CMD_COMPLETE |ACX_INTR_HW_AVAILABLE |\ |
|
56 ACX_INTR_DATA |
|
57 |
|
58 #define ALL_EVENTS_VECTOR_NEGATE 0xFFFFFFC0 |
|
59 |
|
60 |
|
61 /** \enum EFwEventState |
|
62 * \brief FwEvent states |
|
63 * |
|
64 * \par Description |
|
65 * |
|
66 * \sa |
|
67 */ |
|
68 typedef enum |
|
69 { |
|
70 FW_EVENT_STATE_IDLE, |
|
71 FW_EVENT_STATE_READING |
|
72 |
|
73 } EFwEventState; |
|
74 |
|
75 |
|
76 typedef struct |
|
77 { |
|
78 TTxnStruct tTxnStruct; |
|
79 TI_UINT8 *pData; |
|
80 |
|
81 } TRegisterTxn; |
|
82 |
|
83 typedef struct |
|
84 { |
|
85 TTxnStruct tTxnStruct; |
|
86 TI_UINT8 *pFwStatus; |
|
87 |
|
88 } TFwStatusTxn; |
|
89 |
|
90 |
|
91 /** \struct TfwEvent |
|
92 * \brief FW event structure |
|
93 * |
|
94 * \par Description |
|
95 * |
|
96 * \sa |
|
97 */ |
|
98 typedef struct |
|
99 { |
|
100 EFwEventState eFwEventState; /* State machine state */ |
|
101 TI_UINT32 uEventMask; /* Static interrupt event mask */ |
|
102 TI_UINT32 uEventVector; |
|
103 TI_BOOL bFwNotificationFlag; |
|
104 TRegisterTxn tMaskTxn; |
|
105 TRegisterTxn tUnMaskTxn; |
|
106 TFwStatusTxn tFwStatusTxn; |
|
107 TFwStatusTxn tMemFwStatusTxn; |
|
108 |
|
109 TI_UINT32 uFwTimeOffset; /* Offset in microseconds between driver and FW clocks */ |
|
110 |
|
111 TI_BOOL bNotIntr; /* Boolean that sgnals us that the fwStatus read is not from an interrupt origin */ |
|
112 |
|
113 TI_HANDLE hOs; /* OS handle */ |
|
114 TI_HANDLE hTWD; |
|
115 TI_HANDLE hReport; /* Report handle */ |
|
116 TI_HANDLE hContext; /* Context-Engine handle */ |
|
117 TI_UINT32 uContextId; /* The ID allocated on registration to context module */ |
|
118 TI_HANDLE hTwIf; /* TwIf handle */ |
|
119 TI_HANDLE hHealthMonitor; /* healthMonitor handle */ |
|
120 TI_HANDLE hEventMbox; |
|
121 TI_HANDLE hCmdMbox; |
|
122 TI_HANDLE hRxXfer; |
|
123 TI_HANDLE hTxXfer; |
|
124 TI_HANDLE hTxHwQueue; |
|
125 TI_HANDLE hTxResult; |
|
126 |
|
127 } TfwEvent; |
|
128 |
|
129 #endif /* _FW_EVENT_ */ |
|
130 |