PDK API Guide for J721E
EventCombinerP.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-present, 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 
33 
52 #ifndef ti_osal_EventCombinerP__include
53 #define ti_osal_EventCombinerP__include
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 #include <stdint.h>
60 #include <stdbool.h>
61 #include <stddef.h>
62 #include <ti/osal/HwiP.h>
63 typedef void (*EventCombinerP_FuncPtr)(uint32_t arg);
64 
71 int32_t EventCombinerP_disableEvent(uint32_t eventId);
72 
79 int32_t EventCombinerP_enableEvent(uint32_t eventId);
80 
87 int32_t EventCombinerP_clearEvent(uint32_t eventId);
88 
100 int32_t EventCombinerP_dispatchPlug(uint32_t eventId, EventCombinerP_FuncPtr eventIsrRoutine,uintptr_t arg,bool unmask );
101 
108 int32_t EventCombinerP_dispatchUnplug(uint32_t eventId);
109 
116 HwiP_Handle EventCombinerP_getHwi(uint32_t groupNum);
117 
118 
126 uint32_t EventCombinerP_getIntNum(uint32_t groupNum);
127 
136 int32_t EventCombinerP_SingleRegisterInt(uint32_t groupNum, uint32_t intNum);
137 
144 int32_t EventCombinerP_GroupRegisterInt(uint32_t intNum[]);
145 
152 #define OSAL_EVTCOMBINE_GROUPREG_SUCCESS (0)
153 
154 #define OSAL_EVTCOMBINE_ERR_GROUPREG_REGISTER_ERR (-1)
155 
156 #define OSAL_EVTCOMBINE_ERR_GROUPREG_INVALID_INTNUM (-2)
157 /* @} */
158 
172 #define OSAL_ECM_GROUP0_INT 4U
173 
174 #define OSAL_ECM_GROUP1_INT 5U
175 
176 #define OSAL_ECM_GROUP2_INT 6U
177 
178 #define OSAL_ECM_GROUP3_INT 7U
179 /* @} */
180 
181 #ifdef __cplusplus
182 }
183 #endif
184 
185 #endif /* ti_osalEventCombinerP__include */
186 /* @} */
int32_t EventCombinerP_enableEvent(uint32_t eventId)
Function to enable an event inside event combiner.
void(* EventCombinerP_FuncPtr)(uint32_t arg)
Definition: EventCombinerP.h:63
int32_t EventCombinerP_GroupRegisterInt(uint32_t intNum[])
Function to register single event combiner group to a vector number.
void * HwiP_Handle
Opaque client reference to an instance of a HwiP.
Definition: HwiP.h:81
int32_t EventCombinerP_dispatchUnplug(uint32_t eventId)
Function to unplug an ISR handler to an event inside event combiner.
int32_t EventCombinerP_dispatchPlug(uint32_t eventId, EventCombinerP_FuncPtr eventIsrRoutine, uintptr_t arg, bool unmask)
Function to plug an ISR handler to an event inside event combiner.
int32_t EventCombinerP_disableEvent(uint32_t eventId)
Function to disable an event inside event combiner.
HwiP_Handle EventCombinerP_getHwi(uint32_t groupNum)
Function to return the Hwi Handle corresponding to an event combiner group number.
int32_t EventCombinerP_clearEvent(uint32_t eventId)
Function to clear an event inside event combiner.
int32_t EventCombinerP_SingleRegisterInt(uint32_t groupNum, uint32_t intNum)
Function to register single event combiner group to a vector number.
uint32_t EventCombinerP_getIntNum(uint32_t groupNum)
Function to return the interrupt vector number corresponding to a group number (0-3)
Hardware Interrupt module for the RTOS Porting Interface.