VSF Documented
i_reg_gpio.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __I_REG_GPIO_H__
19#define __I_REG_GPIO_H__
20
21/*============================ INCLUDES ======================================*/
22
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34/*============================ MACROS ========================================*/
35
36#ifndef __AIC8800_GPIO_USE_BIT_FIELD
37# define __AIC8800_GPIO_USE_BIT_FIELD DISABLED
38#endif
39
40/* Define structure member permissions : 'read only' */
41#ifndef __IM
42# define __IM const
43#endif
44
45/* Define structure member permissions : 'write only' */
46#ifndef __OM
47# define __OM
48#endif
49
50/* Define structure member permissions : 'read or write' */
51#ifndef __IOM
52# define __IOM
53#endif
54
55/*============================ MACROFIED FUNCTIONS ===========================*/
56
57#if __AIC8800_GPIO_USE_BIT_FIELD == ENABLED
58# define DEF_GPIO_REG(__NAME, __TOTAL_SIZE, ...) \
59 union { \
60 reg##__TOTAL_SIZE##_t VALUE; \
61 struct { \
62 __VA_ARGS__ \
63 }; \
64 } __NAME
65#else
66# define DEF_GPIO_REG(__NAME, __TOTAL_SIZE, ...) \
67 __VA_ARGS__ reg##__TOTAL_SIZE##_t __NAME
68#endif
69
70/*============================ TYPES =========================================*/
71
72typedef struct GPIO_REG_T {
76 DEF_GPIO_REG(TELR , 32, __IOM);
77 DEF_GPIO_REG(TER , 32, __IOM);
78 DEF_GPIO_REG(TLR , 32, __IOM);
79 DEF_GPIO_REG(ICR , 32, __IOM);
81 DEF_GPIO_REG(ISR , 32, __OM);
82 DEF_GPIO_REG(IRR , 32, __IOM);
83 DEF_GPIO_REG(TIR , 32, __IOM);
86
87#ifdef __cplusplus
88}
89#endif
90#endif
91/* EOF */
#define REG_RSVD_U32
Definition i_io_systick.h:138
#define __OM
Definition i_reg_gpio.h:47
#define __IOM
Definition i_reg_gpio.h:52
Definition i_reg_gpio.h:72
DEF_GPIO_REG(FR, 32, __IOM)
DEF_GPIO_REG(ICR, 32, __IOM)
DEF_GPIO_REG(VR, 32, __IOM)
DEF_GPIO_REG(TIR, 32, __IOM)
DEF_GPIO_REG(IRR, 32, __IOM)
DEF_GPIO_REG(MR, 32, __IOM)
DEF_GPIO_REG(TER, 32, __IOM)
DEF_GPIO_REG(DR, 32, __IOM)
DEF_GPIO_REG(TELR, 32, __IOM)
DEF_GPIO_REG(TLR, 32, __IOM)
REG_RSVD_U32 DEF_GPIO_REG(ISR, 32, __OM)