You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

114 lines
3.0 KiB

#ifndef __GPIO_REGISTERS_MAP_HEADER__
#define __GPIO_REGISTERS_MAP_HEADER__
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
union {
volatile uint32_t REVISION;
volatile struct {
uint32_t Y_MINOR : 6; // 5:0
uint32_t CUSTOM : 2; // 7:6
uint32_t X_MAJOR : 3; // 10:8
uint32_t R_RTL : 5; // 15:11
uint32_t FUNC : 12; // 27:16
uint32_t rsvd28 : 2; // 29:28
uint32_t SCHEME : 2; // 31:30
} REVISION_bit;
}; // 0x0 - 0x3
uint8_t rsvd1[12]; // 0x4 - 0xf
union {
volatile uint32_t SYSCONFIG;
volatile struct {
uint32_t AUTOIDLE : 1; // 0:0
uint32_t SOFTRESET : 1; // 1:1
uint32_t ENAWAKEUP : 1; // 2:2
uint32_t IDLEMODE : 2; // 4:3
uint32_t rsvd28 : 27; // 31:5
} SYSCONFIG_bit;
}; // 0x10 - 0x13
uint8_t rsvd2[12]; // 0x14 - 0x1f
union {
volatile uint32_t EOI;
volatile struct {
uint32_t DMAEVT_ACK : 1; // 0:0
uint32_t rsvd28 : 31; // 31:1
} EOI_bit;
}; // 0x20 - 0x23
volatile uint32_t IRQSTS_RAW_0; // 0x24 - 0x27
volatile uint32_t IRQSTS_RAW_1; // 0x28 - 0x2B
volatile uint32_t IRQSTS_0; // 0x2C - 0x2F
volatile uint32_t IRQSTS_1; // 0x30 - 0x33
volatile uint32_t IRQSTS_SET_0; // 0x34 - 0x37
volatile uint32_t IRQSTS_SET_1; // 0x38 - 0x3B
volatile uint32_t IRQSTS_CLR_0; // 0x3C - 0x3F
volatile uint32_t IRQSTS_CLR_1; // 0x40 - 0x43
volatile uint32_t IRQWAKEN_0; // 0x44 - 0x47
volatile uint32_t IRQWAKEN_1; // 0x48 - 0x4B
uint8_t rsvd3[200]; // 0x4C - 0x113
union {
volatile uint32_t SYSSTS;
volatile struct {
uint32_t RESETDONE : 1; // 0:0
uint32_t rsvd28 : 31; // 31:1
} SYSSTS_bit;
}; // 0x114 - 0x117
uint8_t rsvd4[24]; // 0x118 - 0x12f
union {
volatile uint32_t CTRL;
volatile struct {
uint32_t DISABLEMODULE : 1; // 0:0
uint32_t GATINGRATIO : 2; // 2:1
uint32_t rsvd28 : 29; // 31:3
} CTRL_bit;
}; // 0x130 - 0x133
union {
volatile uint32_t OE;
volatile uint32_t OUTPUTEN_N;
}; // 0x134 - 0x137
volatile uint32_t DATAIN; // 0x138 - 0x13b
volatile uint32_t DATAOUT; // 0x13c - 0x13f
union {
volatile uint32_t LEVELDETECT0;
volatile uint32_t LEVELDETECT0_N;
}; // 0x140 - 0x143
union {
volatile uint32_t LEVELDETECT1;
volatile uint32_t LEVELDETECT1_N;
}; // 0x144 - 0x147
union {
volatile uint32_t RISINGDETECT;
volatile uint32_t RISINGDETECT_N;
}; // 0x148 - 0x14b
union {
volatile uint32_t FALLINGDETECT;
volatile uint32_t FALLINGDETECT_N;
}; // 0x14c - 0x14f
union {
volatile uint32_t DEBOUNCEN;
volatile uint32_t DEBOUNCEN_N;
}; // 0x150 - 0x153
union {
volatile uint32_t DEBOUNCINGTIME;
volatile struct {
uint32_t DEBOUNCINGTIME : 8; // 7:0
uint32_t rsvd28 : 24; // 31:8
} DEBOUNCINGTIME_bit;
}; // 0x154 - 0x157
union {
volatile uint32_t CLRDATAOUT;
volatile uint32_t CLRDATAOUT_N;
}; // 0x158 - 0x15b
union {
volatile uint32_t SETDATAOUT;
volatile uint32_t SETDATAOUT_N;
}; // 0x15c - 0x15f
} sysGPIOregs;
#ifdef __cplusplus
}
#endif
#endif