IPC API  3.00.01.24
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Notify.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2013, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
98 #ifndef ti_ipc_Notify__include
99 #define ti_ipc_Notify__include
100 
101 #if defined (__cplusplus)
102 extern "C" {
103 #endif
104 
105 /* =============================================================================
106  * All success and failure codes for the module
107  * =============================================================================
108  */
109 
113 #define Notify_S_BUSY 2
114 
118 #define Notify_S_ALREADYSETUP 1
119 
123 #define Notify_S_SUCCESS 0
124 
128 #define Notify_E_FAIL -1
129 
133 #define Notify_E_INVALIDARG -2
134 
138 #define Notify_E_MEMORY -3
139 
143 #define Notify_E_ALREADYEXISTS -4
144 
148 #define Notify_E_NOTFOUND -5
149 
153 #define Notify_E_TIMEOUT -6
154 
158 #define Notify_E_INVALIDSTATE -7
159 
163 #define Notify_E_OSFAILURE -8
164 
168 #define Notify_E_ALREADYSETUP -9
169 
173 #define Notify_E_RESOURCE -10
174 
178 #define Notify_E_RESTART -11
179 
183 #define Notify_E_BUSY -12
184 
188 #define Notify_E_DRIVERNOTREGISTERED -13
189 
193 #define Notify_E_EVTNOTREGISTERED -14
194 
198 #define Notify_E_EVTDISABLED -15
199 
203 #define Notify_E_NOTINITIALIZED -16
204 
208 #define Notify_E_EVTRESERVED -17
209 
210 /* =============================================================================
211  * Macros
212  * =============================================================================
213  */
214 
218 #define Notify_MAXEVENTS (UInt16)32
219 
223 #define Notify_MAX_INTLINES 4u
224 
230 #define Notify_SYSTEMKEY ((UInt16)0xC1D2)
231 
232 /* =============================================================================
233  * Structures & Enums
234  * =============================================================================
235  */
236 
248 typedef Void (*Notify_FnNotifyCbck)(UInt16 , UInt16, UInt32, UArg, UInt32);
249 
250 /* =============================================================================
251  * Notify Module-wide Functions
252  * =============================================================================
253  */
254 
280 Int Notify_attach(UInt16 remoteProcId, Ptr sharedAddr);
281 
305 UInt Notify_disable(UInt16 procId, UInt16 lineId);
306 
330 Void Notify_disableEvent(UInt16 procId, UInt16 lineId, UInt32 eventId);
331 
350 Void Notify_enableEvent(UInt16 procId, UInt16 lineId, UInt32 eventId);
351 
378 Bool Notify_eventAvailable(UInt16 procId, UInt16 lineId, UInt32 eventId);
379 
395 Bool Notify_intLineRegistered(UInt16 procId, UInt16 lineId);
396 
407 UInt16 Notify_numIntLines(UInt16 procId);
408 
422 SizeT Notify_sharedMemReq(UInt16 procId, Ptr sharedAddr);
423 
456 Int Notify_registerEvent(UInt16 procId,
457  UInt16 lineId,
458  UInt32 eventId,
459  Notify_FnNotifyCbck fnNotifyCbck,
460  UArg cbckArg);
461 
488 Int Notify_registerEventSingle(UInt16 procId,
489  UInt16 lineId,
490  UInt32 eventId,
491  Notify_FnNotifyCbck fnNotifyCbck,
492  UArg cbckArg);
493 
509 Void Notify_restore(UInt16 procId, UInt16 lineId, UInt key);
510 
557 Int Notify_sendEvent(UInt16 procId, UInt16 lineId, UInt32 eventId,
558  UInt32 payload, Bool waitClear);
559 
583 Int Notify_unregisterEvent(UInt16 procId, UInt16 lineId, UInt32 eventId,
584  Notify_FnNotifyCbck fnNotifyCbck, UArg cbckArg);
585 
603 Int Notify_unregisterEventSingle(UInt16 procId, UInt16 lineId, UInt32 eventId);
604 
605 #if defined (__cplusplus)
606 }
607 #endif /* defined (__cplusplus) */
608 #endif /* ti_ipc_Notify__include */
Copyright 2013, Texas Instruments Incorporated