PDK API Guide for AM64x
EventP.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018, 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  */
32 
50 #ifndef ti_osal_EventP__include
51 #define ti_osal_EventP__include
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 #include <stdint.h>
58 #include <stdbool.h>
59 #include <stddef.h>
60 #include <ti/sysbios/knl/Event.h>
61 
74 #define EventP_ID_NONE Event_Id_NONE
75 
78 #define EventP_ID_00 Event_Id_00
79 
82 #define EventP_ID_01 Event_Id_01
83 
86 #define EventP_ID_02 Event_Id_02
87 
90 #define EventP_ID_03 Event_Id_03
91 
94 #define EventP_ID_04 Event_Id_04
95 
98 #define EventP_ID_05 Event_Id_05
99 
102 #define EventP_ID_06 Event_Id_06
103 
106 #define EventP_ID_07 Event_Id_07
107 
110 #define EventP_ID_08 Event_Id_08
111 
114 #define EventP_ID_09 Event_Id_09
115 
118 #define EventP_ID_10 Event_Id_10
119 /* @} */
120 
124 typedef enum EventP_Status_e
125 {
129  EventP_FAILURE = (-(int32_t)1)
130 } EventP_Status;
131 
135 #define EventP_WAIT_FOREVER (~((uint32_t)0U))
136 
140 #define EventP_NO_WAIT ((uint32_t)0U)
141 
142 
149 typedef void *EventP_Handle;
150 
157 typedef struct EventP_Params_s
158 {
159  void *instance;
160 } EventP_Params;
161 
170 
176 extern void EventP_delete(EventP_Handle *handle);
177 
183 extern void EventP_Params_init(EventP_Params *params);
184 
194 extern uint32_t EventP_pend(EventP_Handle handle, uint32_t andMask,
195  uint32_t orMask, uint32_t timeout);
196 
203 extern void EventP_post(EventP_Handle handle, uint32_t eventMask);
204 
211 extern uint32_t EventP_getPostedEvents(EventP_Handle handle);
212 
213 #ifdef __cplusplus
214 }
215 #endif
216 
217 #endif /* ti_osal_EventP__include */
218 /* @} */
Basic EventP Parameters.
Definition: EventP.h:157
Definition: EventP.h:129
EventP_Status
Status codes for EventP APIs.
Definition: EventP.h:124
void EventP_delete(EventP_Handle *handle)
Function to delete an event.
uint32_t EventP_pend(EventP_Handle handle, uint32_t andMask, uint32_t orMask, uint32_t timeout)
Function for Event Pend.
void EventP_Params_init(EventP_Params *params)
Initialize params structure to default values.
EventP_Handle EventP_create(EventP_Params *params)
Function to create an event.
void * instance
Definition: EventP.h:159
void * EventP_Handle
Opaque client reference to an instance of a EventP.
Definition: EventP.h:149
uint32_t EventP_getPostedEvents(EventP_Handle handle)
Function to return Event Posted.
void EventP_post(EventP_Handle handle, uint32_t eventMask)
Function for Event Post.
Definition: EventP.h:127