00001
00041 #ifndef GPIO_PORTMUX_GPIO_REGS_H_INCLUDED
00042 #define GPIO_PORTMUX_GPIO_REGS_H_INCLUDED
00043
00044 #include <chip/memory-map.h>
00045 #ifndef __ASSEMBLER__
00046 # include <io.h>
00047 #endif
00048
00049
00050 #define GPIO_GPER 0x0000
00051 #define GPIO_GPERS 0x0004
00052 #define GPIO_GPERC 0x0008
00053 #define GPIO_GPERT 0x000c
00054 #define GPIO_PMR0 0x0010
00055 #define GPIO_PMR0S 0x0014
00056 #define GPIO_PMR0C 0x0018
00057 #define GPIO_PMR0T 0x001c
00058 #define GPIO_PMR1 0x0020
00059 #define GPIO_PMR1S 0x0024
00060 #define GPIO_PMR1C 0x0028
00061 #define GPIO_PMR1T 0x002c
00062 #define GPIO_ODER 0x0040
00063 #define GPIO_ODERS 0x0044
00064 #define GPIO_ODERC 0x0048
00065 #define GPIO_ODERT 0x004c
00066 #define GPIO_OVR 0x0050
00067 #define GPIO_OVRS 0x0054
00068 #define GPIO_OVRC 0x0058
00069 #define GPIO_OVRT 0x005c
00070 #define GPIO_PVR 0x0060
00071 #define GPIO_PUER 0x0070
00072 #define GPIO_PUERS 0x0074
00073 #define GPIO_PUERC 0x0078
00074 #define GPIO_PUERT 0x007c
00075 #define GPIO_PDER 0x0080
00076 #define GPIO_PDERS 0x0084
00077 #define GPIO_PDERC 0x0088
00078 #define GPIO_PDERT 0x008c
00079 #define GPIO_IER 0x0090
00080 #define GPIO_IERS 0x0094
00081 #define GPIO_IERC 0x0098
00082 #define GPIO_IERT 0x009c
00083 #define GPIO_IMR0 0x00a0
00084 #define GPIO_IMR0S 0x00a4
00085 #define GPIO_IMR0C 0x00a8
00086 #define GPIO_IMR0T 0x00ac
00087 #define GPIO_IMR1 0x00b0
00088 #define GPIO_IMR1S 0x00b4
00089 #define GPIO_IMR1C 0x00b8
00090 #define GPIO_IMR1T 0x00bc
00091 #define GPIO_GFER 0x00c0
00092 #define GPIO_GFERS 0x00c4
00093 #define GPIO_GFERC 0x00c8
00094 #define GPIO_GFERT 0x00cc
00095 #define GPIO_IFR 0x00d0
00096 #define GPIO_IFRC 0x00d8
00097 #define GPIO_ODMER 0x00e0
00098 #define GPIO_ODMERS 0x00e4
00099 #define GPIO_ODMERC 0x00e8
00100 #define GPIO_ODMERT 0x00ec
00101 #define GPIO_ODCR0 0x0100
00102 #define GPIO_ODCR0S 0x0104
00103 #define GPIO_ODCR0C 0x0108
00104 #define GPIO_ODCR0T 0x010c
00105 #define GPIO_ODCR1 0x0110
00106 #define GPIO_ODCR1S 0x0114
00107 #define GPIO_ODCR1C 0x0118
00108 #define GPIO_ODCR1T 0x011c
00109 #define GPIO_OSRR0 0x0130
00110 #define GPIO_OSRR0S 0x0134
00111 #define GPIO_OSRR0C 0x0138
00112 #define GPIO_OSRR0T 0x013c
00113 #define GPIO_STER 0x0160
00114 #define GPIO_STERS 0x0164
00115 #define GPIO_STERC 0x0168
00116 #define GPIO_STERT 0x016c
00117 #define GPIO_VERSION 0x01fc
00118
00119
00120 #define gpio_read_reg(port, reg) \
00121 mmio_read32((port) + GPIO_##reg)
00122
00123 #define gpio_write_reg(port, reg, value) \
00124 mmio_write32((port) + GPIO_##reg, value)
00125
00126 #endif