PDK API Guide for AM64x
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 HwiP_Handle EventCombinerP_getHwi(uint32_t groupNum);
109 
110 
118 int32_t EventCombinerP_getIntNum(int32_t groupNum);
119 
128 int32_t EventCombinerP_SingleRegisterInt(int32_t groupNum, int32_t intNum);
129 
136 int32_t EventCombinerP_GroupRegisterInt(int32_t intNum[]);
137 
144 #define OSAL_EVTCOMBINE_GROUPREG_SUCCESS (0)
145 
146 #define OSAL_EVTCOMBINE_ERR_GROUPREG_REGISTER_ERR (-1)
147 
148 #define OSAL_EVTCOMBINE_ERR_GROUPREG_INVALID_INTNUM (-2)
149 /* @} */
150 
164 #define OSAL_ECM_GROUP0_INT 4
165 
166 #define OSAL_ECM_GROUP1_INT 5
167 
168 #define OSAL_ECM_GROUP2_INT 6
169 
170 #define OSAL_ECM_GROUP3_INT 7
171 /* @} */
172 
173 #ifdef __cplusplus
174 }
175 #endif
176 
177 #endif /* ti_osalEventCombinerP__include */
178 /* @} */
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
void * HwiP_Handle
Opaque client reference to an instance of a HwiP.
Definition: HwiP.h:81
int32_t EventCombinerP_SingleRegisterInt(int32_t groupNum, int32_t intNum)
Function to register single event combiner group to a vector number.
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_getIntNum(int32_t groupNum)
Function to return the interrupt vector number corresponding to a group number (0-3)
int32_t EventCombinerP_GroupRegisterInt(int32_t intNum[])
Function to register single event combiner group to a vector number.
Hardware Interrupt module for the RTOS Porting Interface.