J722S MCU+ SDK  09.02.00
sdl_vim.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Texas Instruments Incorporated 2024
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * 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
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  */
33 
41 #ifndef SDL_VIM_H
42 #define SDL_VIM_H
43 
44 #include <stdint.h>
45 #include <stdbool.h>
46 #include "sdlr_vim.h"
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
56 #define SDL_VIM_MAX_INTR_GROUPS (32U)
57 
61 #define SDL_VIM_NUM_INTRS_PER_GROUP (32U)
62 
67 typedef uint32_t SDL_VimIntrType;
68 
74 #define SDL_VIM_INTR_TYPE_LEVEL ((uint32_t)0U)
75 
77 #define SDL_VIM_INTR_TYPE_PULSE ((uint32_t)1U)
78 
84 typedef uint32_t SDL_VimIntrMap;
85 
90 #define SDL_VIM_INTR_MAP_IRQ ((uint32_t)0U)
91 
96 #define SDL_VIM_INTR_MAP_FIQ ((uint32_t)1U)
97 
101 #define SDL_VIM_INTR_MAP_ALL ((uint32_t)2U)
102 
107 typedef struct {
108  volatile uint32_t INTR_EN_SET;
110  volatile uint32_t INTR_EN_CLR;
112  volatile uint32_t INTMAP;
114  volatile uint32_t INTTYPE;
117 
121 typedef struct {
128  volatile uint32_t PID;
130  volatile uint32_t INFO;
133 
150 void SDL_VIM_setDedVectorAddr( SDL_vimRegs *pRegs, uint32_t dedVectorAddr );
151 
168 int32_t SDL_VIM_getDedVectorAddr( SDL_vimRegs *pRegs, uint32_t *pDedVectorAddr );
169 
170 
171 #ifdef __cplusplus
172 }
173 #endif /* extern "C" */
174 
175 #endif /* end of SDL_VIM_H_ definition */
SDL_vimRegs_VEC
Definition: sdlr_vim.h:70
SDL_VIM_setDedVectorAddr
void SDL_VIM_setDedVectorAddr(SDL_vimRegs *pRegs, uint32_t dedVectorAddr)
Set the DED interrupt vector address.
SDL_vimRegs
Definition: sdlr_vim.h:75
SDL_VIM_MAX_INTR_GROUPS
#define SDL_VIM_MAX_INTR_GROUPS
This enumerator defines the maximum interrupt groups in VIM.
Definition: sdl_vim.h:56
SDL_VIM_getDedVectorAddr
int32_t SDL_VIM_getDedVectorAddr(SDL_vimRegs *pRegs, uint32_t *pDedVectorAddr)
Get the DED interrupt vector address.
SDL_vimStaticRegs_GRP::INTR_EN_SET
volatile uint32_t INTR_EN_SET
Definition: sdl_vim.h:108
SDL_vimStaticRegs::PID
volatile uint32_t PID
Definition: sdl_vim.h:128
SDL_VimIntrType
uint32_t SDL_VimIntrType
This enumerator defines the possible interrupt types. Each source interrupt is either an active high ...
Definition: sdl_vim.h:67
SDL_vimRegs_PRI
Definition: sdlr_vim.h:65
SDL_vimStaticRegs
This structure defines the static register groups identified for VIM.
Definition: sdl_vim.h:121
sdlr_vim.h
SDL_vimStaticRegs_GRP::INTTYPE
volatile uint32_t INTTYPE
Definition: sdl_vim.h:114
SDL_VIM_NUM_INTRS_PER_GROUP
#define SDL_VIM_NUM_INTRS_PER_GROUP
This enumerator defines the number of interrupts per group in VIM.
Definition: sdl_vim.h:61
SDL_vimStaticRegs_GRP
This structure defines the group registers identified for VIM static registers.
Definition: sdl_vim.h:107
SDL_VimIntrMap
uint32_t SDL_VimIntrMap
This enumerator defines the possible output interrupt types. Each source interrupt can be configured ...
Definition: sdl_vim.h:84
SDL_vimStaticRegs_GRP::INTMAP
volatile uint32_t INTMAP
Definition: sdl_vim.h:112
SDL_vimStaticRegs_GRP::INTR_EN_CLR
volatile uint32_t INTR_EN_CLR
Definition: sdl_vim.h:110
SDL_vimStaticRegs::INFO
volatile uint32_t INFO
Definition: sdl_vim.h:130