1 |
588 |
jeremybenn |
/* IO DEFINITIONS AND MACROS FOR THE MCS912DG256B
|
2 |
|
|
09/19/03
|
3 |
|
|
EMAC.inc
|
4 |
|
|
Nathan Z. Gustavson ngustavson@emacinc.com
|
5 |
|
|
Emac.inc
|
6 |
|
|
May 2005; Modified by Jefferson Smith for general use in GEL
|
7 |
|
|
*/
|
8 |
|
|
#ifndef _ARCH_IODG256B_H
|
9 |
|
|
#define _ARCH_IODG256B_H
|
10 |
|
|
|
11 |
|
|
#define IO_BASE 0
|
12 |
|
|
/*macros
|
13 |
|
|
*/
|
14 |
|
|
#define ienable() __asm("cli");
|
15 |
|
|
#define idisable() __asm("orcc #0x10")
|
16 |
|
|
#define xenable() __asm("andcc #0xbf")
|
17 |
|
|
#define xdisable()__asm("orcc #0x40")
|
18 |
|
|
|
19 |
|
|
/* constant offsets to use where a C expression doesn't work
|
20 |
|
|
*/
|
21 |
|
|
#define M6811_PORTA 0x00
|
22 |
|
|
#define M6811_PORTB 0x01
|
23 |
|
|
#define M6811_PTT 0x240
|
24 |
|
|
#define M6811_PTM 0x250
|
25 |
|
|
#define M6811_PTP 0x258
|
26 |
|
|
#define M6811_PTH 0x260
|
27 |
|
|
|
28 |
|
|
#define PORTIO_8 *(volatile unsigned char *)
|
29 |
|
|
#define PORTIO_16 *(volatile unsigned short int *)
|
30 |
|
|
|
31 |
|
|
/* Core HC12 Registers
|
32 |
|
|
*/
|
33 |
|
|
#define PORTA PORTIO_8(IO_BASE + 0x00) /* port A */
|
34 |
|
|
#define PORTB PORTIO_8(IO_BASE + 0x01) /* port B */
|
35 |
|
|
#define DDRA PORTIO_8(IO_BASE + 0x02) /* data direction port A */
|
36 |
|
|
#define DDRB PORTIO_8(IO_BASE + 0x03) /* data direction port B */
|
37 |
|
|
#define PORTE PORTIO_8(IO_BASE + 0x08) /* port E */
|
38 |
|
|
#define DDRE PORTIO_8(IO_BASE + 0x09) /* data direction port E */
|
39 |
|
|
#define PEAR PORTIO_8(IO_BASE + 0x0a) /* port E assignment register */
|
40 |
|
|
#define MODE PORTIO_8(IO_BASE + 0x0b) /* mode register */
|
41 |
|
|
#define PUCR PORTIO_8(IO_BASE + 0x0c) /* pull-up control register */
|
42 |
|
|
#define RDRIV PORTIO_8(IO_BASE + 0x0d) /* reduced drive of I/O lines */
|
43 |
|
|
#define EBICTL PORTIO_8(IO_BASE + 0x0e) /* external bus control */
|
44 |
|
|
#define INITRM PORTIO_8(IO_BASE + 0x10) /* RAM mapping register */
|
45 |
|
|
#define INITRG PORTIO_8(IO_BASE + 0x11) /* IO mapping register */
|
46 |
|
|
#define INITEE PORTIO_8(IO_BASE + 0x12) /* EEPROM mapping register */
|
47 |
|
|
#define MISC PORTIO_8(IO_BASE + 0x13) /* mapping control register */
|
48 |
|
|
#define MTST0 PORTIO_8(IO_BASE + 0x14) /* mapping test register 0 */
|
49 |
|
|
#define ITCR PORTIO_8(IO_BASE + 0x15) /* interrupt test control reg. */
|
50 |
|
|
#define ITEST PORTIO_8(IO_BASE + 0x16) /* interrupt test register */
|
51 |
|
|
#define MTST1 PORTIO_8(IO_BASE + 0x17) /* mapping test register 1 */
|
52 |
|
|
#define PARTID PORTIO_16(IO_BASE + 0x1a) /* part ID register */
|
53 |
|
|
#define MEMSIZ0 PORTIO_8(IO_BASE + 0x1c) /* memory size register 0 */
|
54 |
|
|
#define MEMSIZ1 PORTIO_8(IO_BASE + 0x1d) /* memory size register 1 */
|
55 |
|
|
#define INTCR PORTIO_8(IO_BASE + 0x1e) /* interrupt control */
|
56 |
|
|
#define HPRIO PORTIO_8(IO_BASE + 0x1f) /* highest priority */
|
57 |
|
|
|
58 |
|
|
/*
|
59 |
|
|
bitflags
|
60 |
|
|
*/
|
61 |
|
|
//PEAR
|
62 |
|
|
#define NOACCE 0x80
|
63 |
|
|
#define PIPOE 0x20
|
64 |
|
|
#define NECLK 0x10
|
65 |
|
|
#define LSTRE 0x08
|
66 |
|
|
#define RDWE 0x04
|
67 |
|
|
//INTCR bitflags
|
68 |
|
|
#define IRQE 0x80
|
69 |
|
|
#define IRQEN 0x40
|
70 |
|
|
#define DLY 0x20
|
71 |
|
|
|
72 |
|
|
/* BKP Module
|
73 |
|
|
*/
|
74 |
|
|
#define BKPCT0 PORTIO_8(IO_BASE + 0x28) /* Breakpoint Control 0 */
|
75 |
|
|
#define BKPCT1 PORTIO_8(IO_BASE + 0x29) /* Breakpoint Control 1 */
|
76 |
|
|
#define BKP0X PORTIO_8(IO_BASE + 0x2a) /* Breakpoint 0 address upper */
|
77 |
|
|
#define BKP0 PORTIO_16(IO_BASE + 0x2b) /* Breakpoint 0 address */
|
78 |
|
|
#define BKP1X PORTIO_8(IO_BASE + 0x2d) /* Breakpoint 1 address upper */
|
79 |
|
|
#define BKP1 PORTIO_16(IO_BASE + 0x2e) /* Breakpoint 1 address */
|
80 |
|
|
|
81 |
|
|
/* MEBI Module
|
82 |
|
|
*/
|
83 |
|
|
#define PPAGE PORTIO_8(IO_BASE + 0x30) /* program page register */
|
84 |
|
|
#define PORTK PORTIO_8(IO_BASE + 0x32) /* port K data register */
|
85 |
|
|
#define DDRK PORTIO_8(IO_BASE + 0x33) /* port K data direction */
|
86 |
|
|
|
87 |
|
|
/* CRG Module
|
88 |
|
|
*/
|
89 |
|
|
#define SYNR PORTIO_8(IO_BASE + 0x34) /* synthesizer register */
|
90 |
|
|
#define REFDV PORTIO_8(IO_BASE + 0x35) /* reference divider register */
|
91 |
|
|
#define CTFLG PORTIO_8(IO_BASE + 0x36) /* clock test flag register */
|
92 |
|
|
#define CRGFLG PORTIO_8(IO_BASE + 0x37) /* clock generator flag register */
|
93 |
|
|
#define CRGINT PORTIO_8(IO_BASE + 0x38) /* clock interrupt enable */
|
94 |
|
|
#define CLKSEL PORTIO_8(IO_BASE + 0x39) /* clock select register */
|
95 |
|
|
#define PLLCTL PORTIO_8(IO_BASE + 0x3a) /* PLL control register */
|
96 |
|
|
#define RTICTL PORTIO_8(IO_BASE + 0x3b) /* clock real time control reg. */
|
97 |
|
|
#define COPCTL PORTIO_8(IO_BASE + 0x3c) /* COP control register */
|
98 |
|
|
#define FORBYP PORTIO_8(IO_BASE + 0x3d) /* clock force and bypass register */
|
99 |
|
|
#define CTCTL PORTIO_8(IO_BASE + 0x3e) /* clock test control register */
|
100 |
|
|
#define ARMCOP PORTIO_8(IO_BASE + 0x3f) /* COP arm/reset register with sequence 0x55,0xaa. */
|
101 |
|
|
|
102 |
|
|
// CRG bitflags
|
103 |
|
|
#define RTIF 0x80
|
104 |
|
|
#define RTIE 0x80
|
105 |
|
|
#define LOCK 0x08
|
106 |
|
|
#define AUTO 0x20
|
107 |
|
|
#define PLLSEL 0x80
|
108 |
|
|
// COPCTL bitflags
|
109 |
|
|
#define WCOP 0x80
|
110 |
|
|
#define RSBCK 0x40
|
111 |
|
|
|
112 |
|
|
/* ECT Module
|
113 |
|
|
*/
|
114 |
|
|
#define TIOS PORTIO_8(IO_BASE + 0x40) /* timer select register */
|
115 |
|
|
#define TCFORC PORTIO_8(IO_BASE + 0x41) /* compare force register */
|
116 |
|
|
#define TOC7M PORTIO_8(IO_BASE + 0x42) /* oc7 mask register */
|
117 |
|
|
#define TOC7D PORTIO_8(IO_BASE + 0x43) /* oc7 data register */
|
118 |
|
|
#define TCNT PORTIO_16(IO_BASE + 0x44) /* timer counter */
|
119 |
|
|
#define TSCR1 PORTIO_8(IO_BASE + 0x46) /* system control register 1 */
|
120 |
|
|
#define TTOV PORTIO_8(IO_BASE + 0x47) /* toggle on overflow register */
|
121 |
|
|
#define TCTL1 PORTIO_8(IO_BASE + 0x48) /* control register 1 */
|
122 |
|
|
#define TCTL2 PORTIO_8(IO_BASE + 0x49) /* control register 2 */
|
123 |
|
|
#define TCTL3 PORTIO_8(IO_BASE + 0x4a) /* control register 3 */
|
124 |
|
|
#define TCTL4 PORTIO_8(IO_BASE + 0x4b) /* control register 4 */
|
125 |
|
|
#define TIE PORTIO_8(IO_BASE + 0x4c) /* interrupt enable register */
|
126 |
|
|
#define TSCR2 PORTIO_8(IO_BASE + 0x4d) /* system control register 2 */
|
127 |
|
|
#define TFLG1 PORTIO_8(IO_BASE + 0x4e) /* interrupt flag register 1 */
|
128 |
|
|
#define TFLG2 PORTIO_8(IO_BASE + 0x4f) /* interrupt flag register 2 */
|
129 |
|
|
#define TC0 PORTIO_16(IO_BASE + 0x50) /* capture/compare register 0 */
|
130 |
|
|
#define TC1 PORTIO_16(IO_BASE + 0x52) /* capture/compare register 0 */
|
131 |
|
|
#define TC2 PORTIO_16(IO_BASE + 0x54) /* capture/compare register 0 */
|
132 |
|
|
#define TC3 PORTIO_16(IO_BASE + 0x56) /* capture/compare register 0 */
|
133 |
|
|
#define TC4 PORTIO_16(IO_BASE + 0x58) /* capture/compare register 0 */
|
134 |
|
|
#define TC5 PORTIO_16(IO_BASE + 0x5a) /* capture/compare register 0 */
|
135 |
|
|
#define TC6 PORTIO_16(IO_BASE + 0x5c) /* capture/compare register 0 */
|
136 |
|
|
#define TC7 PORTIO_16(IO_BASE + 0x5e) /* capture/compare register 0 */
|
137 |
|
|
#define PACTL PORTIO_8(IO_BASE + 0x60) /* pulse accumulator A control */
|
138 |
|
|
#define PAFLG PORTIO_8(IO_BASE + 0x61) /* pulse accumulator A flag */
|
139 |
|
|
#define PACN3 PORTIO_8(IO_BASE + 0x62) /* pulse accumulator A3 count */
|
140 |
|
|
#define PACN2 PORTIO_8(IO_BASE + 0x63) /* pulse accumulator A2 count */
|
141 |
|
|
#define PACN1 PORTIO_8(IO_BASE + 0x64) /* pulse accumulator A1 count */
|
142 |
|
|
#define PACN0 PORTIO_8(IO_BASE + 0x65) /* pulse accumulator A0 count */
|
143 |
|
|
#define MCCTL PORTIO_8(IO_BASE + 0x66) /* modulus counter control reg */
|
144 |
|
|
#define MCFLG PORTIO_8(IO_BASE + 0x67) /* modulus counter flag reg */
|
145 |
|
|
#define ICPAR PORTIO_8(IO_BASE + 0x68) /* input control pulse acc reg */
|
146 |
|
|
#define DLYCT PORTIO_8(IO_BASE + 0x69) /* delay counter control reg */
|
147 |
|
|
#define ICOVW PORTIO_8(IO_BASE + 0x6a) /* input control overwrite reg */
|
148 |
|
|
#define ICSYS PORTIO_8(IO_BASE + 0x6b) /* input control system reg */
|
149 |
|
|
#define TIMTST PORTIO_8(IO_BASE + 0x6d) /* timer test register */
|
150 |
|
|
#define PBCTL PORTIO_8(IO_BASE + 0x70) /* pulse accumulator B control */
|
151 |
|
|
#define PBFLG PORTIO_8(IO_BASE + 0x71) /* pulse accumulator B flag */
|
152 |
|
|
#define PA3H PORTIO_8(IO_BASE + 0x72) /* pulse accumulator B3 count */
|
153 |
|
|
#define PA2H PORTIO_8(IO_BASE + 0x73) /* pulse accumulator B2 count */
|
154 |
|
|
#define PA1H PORTIO_8(IO_BASE + 0x74) /* pulse accumulator B1 count */
|
155 |
|
|
#define PA0H PORTIO_8(IO_BASE + 0x75) /* pulse accumulator B0 count */
|
156 |
|
|
#define MCCNT PORTIO_16(IO_BASE + 0x76) /* modulus counter count reg */
|
157 |
|
|
#define TC0H PORTIO_16(IO_BASE + 0x78) /* timer input capture hold 0 */
|
158 |
|
|
#define TC1H PORTIO_16(IO_BASE + 0x7a) /* timer input capture hold 1 */
|
159 |
|
|
#define TC2H PORTIO_16(IO_BASE + 0x7c) /* timer input capture hold 2 */
|
160 |
|
|
#define TC3H PORTIO_16(IO_BASE + 0x7e) /* timer input capture hold 3 */
|
161 |
|
|
|
162 |
|
|
/* ATD0 Module
|
163 |
|
|
*/
|
164 |
|
|
#define ATD0_BASE (IO_BASE + 0x80)
|
165 |
|
|
#define ATD0CTL0 PORTIO_8(IO_BASE + 0x80) /* A/D0 control register 0 */
|
166 |
|
|
#define ATD0CTL1 PORTIO_8(IO_BASE + 0x81) /* A/D0 control register 1 */
|
167 |
|
|
#define ATD0CTL2 PORTIO_8(IO_BASE + 0x82) /* A/D0 control register 2 */
|
168 |
|
|
#define ATD0CTL3 PORTIO_8(IO_BASE + 0x83) /* A/D0 control register 3 */
|
169 |
|
|
#define ATD0CTL4 PORTIO_8(IO_BASE + 0x84) /* A/D0 control register 4 */
|
170 |
|
|
#define ATD0CTL5 PORTIO_8(IO_BASE + 0x85) /* A/D0 control register 5 */
|
171 |
|
|
#define ATD0STAT0 PORTIO_8(IO_BASE + 0x86) /* A/D0 status register 0 */
|
172 |
|
|
#define ATD0STAT1 PORTIO_8(IO_BASE + 0x87) /* A/D0 status register 1 */
|
173 |
|
|
#define ATD0TEST0 PORTIO_8(IO_BASE + 0x88) /* A/D0 test register 0 */
|
174 |
|
|
#define ATD0TEST1 PORTIO_8(IO_BASE + 0x89) /* A/D0 test register 1 */
|
175 |
|
|
#define ATD0DIEN PORTIO_8(IO_BASE + 0x8d) /* A/D0 interrupt enable */
|
176 |
|
|
#define PORTAD0 PORTIO_8(IO_BASE + 0x8f) /* port AD0 data input register */
|
177 |
|
|
#define ATD0DR0 PORTIO_16(IO_BASE + 0x90) /* A/D0 result 0 */
|
178 |
|
|
#define ATD0DR0H PORTIO_8(IO_BASE + 0x90) /* A/D0 result 0 */
|
179 |
|
|
#define ATD0DR1 PORTIO_16(IO_BASE + 0x92) /* A/D0 result 1 */
|
180 |
|
|
#define ATD0DR1H PORTIO_8(IO_BASE + 0x92) /* A/D0 result 1 */
|
181 |
|
|
#define ATD0DR2 PORTIO_16(IO_BASE + 0x94) /* A/D0 result 2 */
|
182 |
|
|
#define ATD0DR2H PORTIO_8(IO_BASE + 0x94) /* A/D0 result 2 */
|
183 |
|
|
#define ATD0DR3 PORTIO_16(IO_BASE + 0x96) /* A/D0 result 3 */
|
184 |
|
|
#define ATD0DR3H PORTIO_8(IO_BASE + 0x96) /* A/D0 result 3 */
|
185 |
|
|
#define ATD0DR4 PORTIO_16(IO_BASE + 0x98) /* A/D0 result 4 */
|
186 |
|
|
#define ATD0DR4H PORTIO_8(IO_BASE + 0x98) /* A/D0 result 4 */
|
187 |
|
|
#define ATD0DR5 PORTIO_16(IO_BASE + 0x9a) /* A/D0 result 5 */
|
188 |
|
|
#define ATD0DR5H PORTIO_8(IO_BASE + 0x9a) /* A/D0 result 5 */
|
189 |
|
|
#define ATD0DR6 PORTIO_16(IO_BASE + 0x9c) /* A/D0 result 6 */
|
190 |
|
|
#define ATD0DR6H PORTIO_8(IO_BASE + 0x9c) /* A/D0 result 6 */
|
191 |
|
|
#define ATD0DR7 PORTIO_16(IO_BASE + 0x9e) /* A/D0 result 7 */
|
192 |
|
|
#define ATD0DR7H PORTIO_8(IO_BASE + 0x9e) /* A/D0 result 7 */
|
193 |
|
|
|
194 |
|
|
//ATDnCTL5 bitflags
|
195 |
|
|
#define DJM 0x80
|
196 |
|
|
#define DSGN 0x40
|
197 |
|
|
#define SCAN 0x20
|
198 |
|
|
#define MULT 0x10
|
199 |
|
|
//ATDnSTAT0 bitflags
|
200 |
|
|
#define SCF 0x80
|
201 |
|
|
#define ETORF 0x20
|
202 |
|
|
#define FIFOR 0x10
|
203 |
|
|
|
204 |
|
|
/* PWM Module
|
205 |
|
|
*/
|
206 |
|
|
#define PWME PORTIO_8(IO_BASE + 0xa0) /* PWM Enable */
|
207 |
|
|
#define PWMPOL PORTIO_8(IO_BASE + 0xa1) /* PWM Clock Polarity */
|
208 |
|
|
#define PWMCLK PORTIO_8(IO_BASE + 0xa2) /* PWM Clocks */
|
209 |
|
|
#define PWMPRCLK PORTIO_8(IO_BASE + 0xa3) /* PWM prescale clock select */
|
210 |
|
|
#define PWMCAE PORTIO_8(IO_BASE + 0xa4) /* PWM center align enable */
|
211 |
|
|
#define PWMCTL PORTIO_8(IO_BASE + 0xa5) /* PWM Control Register */
|
212 |
|
|
#define PWMTST PORTIO_8(IO_BASE + 0xa6) /* PWM Test Register */
|
213 |
|
|
#define PWMPRSC PORTIO_8(IO_BASE + 0xa7) /* PWM Test Register */
|
214 |
|
|
#define PWMSCLA PORTIO_8(IO_BASE + 0xa8) /* PWM scale A */
|
215 |
|
|
#define PWMSCLB PORTIO_8(IO_BASE + 0xa9) /* PWM scale B */
|
216 |
|
|
#define PWMSCNTA PORTIO_8(IO_BASE + 0xaa) /* PWM Test Register A */
|
217 |
|
|
#define PWMSCNTB PORTIO_8(IO_BASE + 0xab) /* PWM Test Register B */
|
218 |
|
|
#define PWMCNT0 PORTIO_8(IO_BASE + 0xac) /* PWM Channel Counter 0 */
|
219 |
|
|
#define PWMCNT1 PORTIO_8(IO_BASE + 0xad) /* PWM Channel Counter 1 */
|
220 |
|
|
#define PWMCNT2 PORTIO_8(IO_BASE + 0xae) /* PWM Channel Counter 2 */
|
221 |
|
|
#define PWMCNT3 PORTIO_8(IO_BASE + 0xaf) /* PWM Channel Counter 3 */
|
222 |
|
|
#define PWMCNT4 PORTIO_8(IO_BASE + 0xb0) /* PWM Channel Counter 4 */
|
223 |
|
|
#define PWMCNT5 PORTIO_8(IO_BASE + 0xb1) /* PWM Channel Counter 5 */
|
224 |
|
|
#define PWMCNT6 PORTIO_8(IO_BASE + 0xb2) /* PWM Channel Counter 6 */
|
225 |
|
|
#define PWMCNT7 PORTIO_8(IO_BASE + 0xb3) /* PWM Channel Counter 7 */
|
226 |
|
|
#define PWMPER0 PORTIO_8(IO_BASE + 0xb4) /* PWM Channel Period 0 */
|
227 |
|
|
#define PWMPER1 PORTIO_8(IO_BASE + 0xb5) /* PWM Channel Period 1 */
|
228 |
|
|
#define PWMPER2 PORTIO_8(IO_BASE + 0xb6) /* PWM Channel Period 2 */
|
229 |
|
|
#define PWMPER3 PORTIO_8(IO_BASE + 0xb7) /* PWM Channel Period 3 */
|
230 |
|
|
#define PWMPER4 PORTIO_8(IO_BASE + 0xb8) /* PWM Channel Period 4 */
|
231 |
|
|
#define PWMPER5 PORTIO_8(IO_BASE + 0xb9) /* PWM Channel Period 5 */
|
232 |
|
|
#define PWMPER6 PORTIO_8(IO_BASE + 0xba) /* PWM Channel Period 6 */
|
233 |
|
|
#define PWMPER7 PORTIO_8(IO_BASE + 0xbb) /* PWM Channel Period 7 */
|
234 |
|
|
#define PWMDTY0 PORTIO_8(IO_BASE + 0xbc) /* PWM Channel Duty 0 */
|
235 |
|
|
#define PWMDTY1 PORTIO_8(IO_BASE + 0xbd) /* PWM Channel Duty 1 */
|
236 |
|
|
#define PWMDTY2 PORTIO_8(IO_BASE + 0xbe) /* PWM Channel Duty 2 */
|
237 |
|
|
#define PWMDTY3 PORTIO_8(IO_BASE + 0xbf) /* PWM Channel Duty 3 */
|
238 |
|
|
#define PWMDTY4 PORTIO_8(IO_BASE + 0xc0) /* PWM Channel Duty 4 */
|
239 |
|
|
#define PWMDTY5 PORTIO_8(IO_BASE + 0xc1) /* PWM Channel Duty 5 */
|
240 |
|
|
#define PWMDTY6 PORTIO_8(IO_BASE + 0xc2) /* PWM Channel Duty 6 */
|
241 |
|
|
#define PWMDTY7 PORTIO_8(IO_BASE + 0xc3) /* PWM Channel Duty 7 */
|
242 |
|
|
#define PWMSDN PORTIO_8(IO_BASE + 0xc4) /* PWM shutdown register */
|
243 |
|
|
|
244 |
|
|
/* SCI register offsets
|
245 |
|
|
jeffs: Use these to offset any standard SCI base
|
246 |
|
|
*/
|
247 |
|
|
#define _SCIBD 0x0 /* SCI baud rate high */
|
248 |
|
|
#define _SCIBDH 0x0 /* SCI baud rate high */
|
249 |
|
|
#define _SCIBDL 0x1 /* SCI baud rate low */
|
250 |
|
|
#define _SCICR1 0x2 /* SCI control register 1 */
|
251 |
|
|
#define _SCICR2 0x3 /* SCI control register 2 */
|
252 |
|
|
#define _SCISR1 0x4 /* SCI status register 1 */
|
253 |
|
|
#define _SCISR2 0x5 /* SCI status register 2 */
|
254 |
|
|
#define _SCIDRH 0x6 /* SCI data register high */
|
255 |
|
|
#define _SCIDRL 0x7 /* SCI data register low */
|
256 |
|
|
|
257 |
|
|
/* SCI0 Module
|
258 |
|
|
jeffs: Use symbols like SCI0_BASE to reference which SCI block
|
259 |
|
|
*/
|
260 |
|
|
#define SCI0_BASE (IO_BASE + 0xc8)
|
261 |
|
|
#define SCI0BD PORTIO_16(IO_BASE + 0xc8) /* SCI 0 baud rate high */
|
262 |
|
|
#define SCI0BDH PORTIO_8(IO_BASE + 0xc8) /* SCI 0 baud rate high */
|
263 |
|
|
#define SCI0BDL PORTIO_8(IO_BASE + 0xc9) /* SCI 0 baud rate low */
|
264 |
|
|
#define SCI0CR1 PORTIO_8(IO_BASE + 0xca) /* SCI 0 control register 1 */
|
265 |
|
|
#define SCI0CR2 PORTIO_8(IO_BASE + 0xcb) /* SCI 0 control register 2 */
|
266 |
|
|
#define SCI0SR1 PORTIO_8(IO_BASE + 0xcc) /* SCI 0 status register 1 */
|
267 |
|
|
#define SCI0SR2 PORTIO_8(IO_BASE + 0xcd) /* SCI 0 status register 2 */
|
268 |
|
|
#define SCI0DRH PORTIO_8(IO_BASE + 0xce) /* SCI 0 data register high */
|
269 |
|
|
#define SCI0DRL PORTIO_8(IO_BASE + 0xcf) /* SCI 0 data register low */
|
270 |
|
|
|
271 |
|
|
/* SCI1 Module
|
272 |
|
|
*/
|
273 |
|
|
#define SCI1_BASE (IO_BASE + 0xd0)
|
274 |
|
|
#define SCI1BD PORTIO_16(IO_BASE + 0xd0) /* SCI 1 16bit baud rate */
|
275 |
|
|
#define SCI1BDH PORTIO_8(IO_BASE + 0xd0) /* SCI 1 baud rate high */
|
276 |
|
|
#define SCI1BDL PORTIO_8(IO_BASE + 0xd1) /* SCI 1 baud rate low */
|
277 |
|
|
#define SCI1CR1 PORTIO_8(IO_BASE + 0xd2) /* SCI 1 control register 1 */
|
278 |
|
|
#define SCI1CR2 PORTIO_8(IO_BASE + 0xd3) /* SCI 1 control register 2 */
|
279 |
|
|
#define SCI1SR1 PORTIO_8(IO_BASE + 0xd4) /* SCI 1 status register 1 */
|
280 |
|
|
#define SCI1SR2 PORTIO_8(IO_BASE + 0xd5) /* SCI 1 status register 2 */
|
281 |
|
|
#define SCI1DRH PORTIO_8(IO_BASE + 0xd6) /* SCI 1 data register high */
|
282 |
|
|
#define SCI1DRL PORTIO_8(IO_BASE + 0xd7) /* SCI 1 data register low */
|
283 |
|
|
|
284 |
|
|
//SCInSR1
|
285 |
|
|
#define TDRE 0x80
|
286 |
|
|
#define RDRF 0x20
|
287 |
|
|
#define IDLE 0x10
|
288 |
|
|
|
289 |
|
|
/* SPI register offsets
|
290 |
|
|
*/
|
291 |
|
|
#define _SPICR1 PORTIO_8(IO_BASE + 0x0) /* SPI control register 1 */
|
292 |
|
|
#define _SPICR2 PORTIO_8(IO_BASE + 0x1) /* SPI control register 2 */
|
293 |
|
|
#define _SPIBR PORTIO_8(IO_BASE + 0x2) /* SPI baud rate register */
|
294 |
|
|
#define _SPISR PORTIO_8(IO_BASE + 0x3) /* SPI status register */
|
295 |
|
|
#define _SPIDR PORTIO_8(IO_BASE + 0x5) /* SPI data register */
|
296 |
|
|
|
297 |
|
|
/* SPI0 Module
|
298 |
|
|
*/
|
299 |
|
|
#define SPI0_BASE (IO_BASE + 0xd8)
|
300 |
|
|
#define SPI0CR1 PORTIO_8(IO_BASE + 0xd8) /* SPI 0 control register 1 */
|
301 |
|
|
#define SPI0CR2 PORTIO_8(IO_BASE + 0xd9) /* SPI 0 control register 2 */
|
302 |
|
|
#define SPI0BR PORTIO_8(IO_BASE + 0xda) /* SPI 0 baud rate register */
|
303 |
|
|
#define SPI0SR PORTIO_8(IO_BASE + 0xdb) /* SPI 0 status register */
|
304 |
|
|
#define SPI0DR PORTIO_8(IO_BASE + 0xdd) /* SPI 0 data register */
|
305 |
|
|
|
306 |
|
|
//SPInCR1
|
307 |
|
|
#define SPIE 0x80
|
308 |
|
|
#define SPE 0x40
|
309 |
|
|
#define SPTIE 0x20
|
310 |
|
|
#define MSTR 0x10
|
311 |
|
|
#define CPOL 0x08
|
312 |
|
|
#define CPHA 0x04
|
313 |
|
|
#define SSOE 0x02
|
314 |
|
|
#define LSBFE 0x01
|
315 |
|
|
|
316 |
|
|
//SPInSR
|
317 |
|
|
#define SPIF 0x80
|
318 |
|
|
#define SPTEF 0x20
|
319 |
|
|
#define MODF 0x10
|
320 |
|
|
|
321 |
|
|
/* I2C Module
|
322 |
|
|
*/
|
323 |
|
|
#define IBAD PORTIO_8(IO_BASE + 0xe0) /* I2C address register */
|
324 |
|
|
#define IBFD PORTIO_8(IO_BASE + 0xe1) /* I2C freqency divider reg */
|
325 |
|
|
#define IBCR PORTIO_8(IO_BASE + 0xe2) /* I2C control register */
|
326 |
|
|
#define IBSR PORTIO_8(IO_BASE + 0xe3) /* I2C status register */
|
327 |
|
|
#define IBDR PORTIO_8(IO_BASE + 0xe4) /* I2C data register */
|
328 |
|
|
|
329 |
|
|
//IBSR
|
330 |
|
|
#define TCF 0x80
|
331 |
|
|
#define IAAS 0x40
|
332 |
|
|
#define IBB 0x20
|
333 |
|
|
#define IBAL 0x10
|
334 |
|
|
#define SRW 0x04
|
335 |
|
|
#define IBIF 0x02
|
336 |
|
|
#define RXAK 0x01
|
337 |
|
|
|
338 |
|
|
/* BDLC Module
|
339 |
|
|
*/
|
340 |
|
|
#define DLCBCR1 PORTIO_8(IO_BASE + 0xe8) /* BDLC control register 1 */
|
341 |
|
|
#define DLCBSVR PORTIO_8(IO_BASE + 0xe9) /* BDLC state vector register */
|
342 |
|
|
#define DLCBCR2 PORTIO_8(IO_BASE + 0xea) /* BDLC control register 2 */
|
343 |
|
|
#define DLCBDR PORTIO_8(IO_BASE + 0xeb) /* BDLC data register */
|
344 |
|
|
#define DLCBARD PORTIO_8(IO_BASE + 0xec) /* BDLC analog round trip delay */
|
345 |
|
|
#define DLCBRSR PORTIO_8(IO_BASE + 0xed) /* BDLC rate select register */
|
346 |
|
|
#define DLCSCR PORTIO_8(IO_BASE + 0xee) /* BDLC control register */
|
347 |
|
|
#define DLCBSTAT PORTIO_8(IO_BASE + 0xef) /* BDLC status register */
|
348 |
|
|
|
349 |
|
|
/* SPI1 Module
|
350 |
|
|
*/
|
351 |
|
|
#define SPI1_BASE (IO_BASE + 0xf0)
|
352 |
|
|
#define SPI1CR1 PORTIO_8(IO_BASE + 0xf0) /* SPI 1 control register 1 */
|
353 |
|
|
#define SPI1CR2 PORTIO_8(IO_BASE + 0xf1) /* SPI 1 control register 2 */
|
354 |
|
|
#define SPI1BR PORTIO_8(IO_BASE + 0xf2) /* SPI 1 baud rate register */
|
355 |
|
|
#define SPI1SR PORTIO_8(IO_BASE + 0xf3) /* SPI 1 status register */
|
356 |
|
|
#define SPI1DR PORTIO_8(IO_BASE + 0xf5) /* SPI 1 data register */
|
357 |
|
|
|
358 |
|
|
/* SPI2 Module
|
359 |
|
|
*/
|
360 |
|
|
#define SPI2_BASE (IO_BASE + 0xf8)
|
361 |
|
|
#define SPI2CR1 PORTIO_8(IO_BASE + 0xf8) /* SPI 2 control register 1 */
|
362 |
|
|
#define SPI2CR2 PORTIO_8(IO_BASE + 0xf9) /* SPI 2 control register 2 */
|
363 |
|
|
#define SPI2BR PORTIO_8(IO_BASE + 0xfa) /* SPI 2 baud rate register */
|
364 |
|
|
#define SPI2SR PORTIO_8(IO_BASE + 0xfb) /* SPI 2 status register */
|
365 |
|
|
#define SPI2DR PORTIO_8(IO_BASE + 0xfd) /* SPI 2 data register */
|
366 |
|
|
|
367 |
|
|
/* FLC Module
|
368 |
|
|
*/
|
369 |
|
|
#define FCLKDIV PORTIO_8(IO_BASE + 0x100) /* flash clock divider */
|
370 |
|
|
#define FSEC PORTIO_8(IO_BASE + 0x101) /* flash security register */
|
371 |
|
|
#define FCNFG PORTIO_8(IO_BASE + 0x103) /* flash configuration register */
|
372 |
|
|
#define FPROT PORTIO_8(IO_BASE + 0x104) /* flash protection register */
|
373 |
|
|
#define FSTAT PORTIO_8(IO_BASE + 0x105) /* flash status register */
|
374 |
|
|
#define FCMD PORTIO_8(IO_BASE + 0x106) /* flash command register */
|
375 |
|
|
|
376 |
|
|
/* EEPROM Module
|
377 |
|
|
*/
|
378 |
|
|
#define ECLKDIV PORTIO_8(IO_BASE + 0x110) /* eeprom clock divider */
|
379 |
|
|
#define ECNFG PORTIO_8(IO_BASE + 0x113) /* eeprom configuration register */
|
380 |
|
|
#define EPROT PORTIO_8(IO_BASE + 0x114) /* eeprom protection register */
|
381 |
|
|
#define ESTAT PORTIO_8(IO_BASE + 0x115) /* eeprom status register */
|
382 |
|
|
#define ECMD PORTIO_8(IO_BASE + 0x116) /* eeprom command register */
|
383 |
|
|
|
384 |
|
|
/* ATD1 Module
|
385 |
|
|
*/
|
386 |
|
|
#define ATD1_BASE (IO_BASE + 0x120)
|
387 |
|
|
#define ATD1CTL0 PORTIO_8(IO_BASE + 0x120) /* A/D1 control register 0 */
|
388 |
|
|
#define ATD1CTL1 PORTIO_8(IO_BASE + 0x121) /* A/D1 control register 1 */
|
389 |
|
|
#define ATD1CTL2 PORTIO_8(IO_BASE + 0x122) /* A/D1 control register 2 */
|
390 |
|
|
#define ATD1CTL3 PORTIO_8(IO_BASE + 0x123) /* A/D1 control register 3 */
|
391 |
|
|
#define ATD1CTL4 PORTIO_8(IO_BASE + 0x124) /* A/D1 control register 4 */
|
392 |
|
|
#define ATD1CTL5 PORTIO_8(IO_BASE + 0x125) /* A/D1 control register 5 */
|
393 |
|
|
#define ATD1STAT0 PORTIO_8(IO_BASE + 0x126) /* A/D1 status register 0 */
|
394 |
|
|
#define ATD1STAT1 PORTIO_8(IO_BASE + 0x127) /* A/D1 status register 1 */
|
395 |
|
|
#define ATD1TEST0 PORTIO_8(IO_BASE + 0x128) /* A/D1 test register 0 */
|
396 |
|
|
#define ATD1TEST1 PORTIO_8(IO_BASE + 0x129) /* A/D1 test register 1 */
|
397 |
|
|
#define ATD1DIEN PORTIO_8(IO_BASE + 0x12d) /* A/D1 interrupt enable */
|
398 |
|
|
#define PORTAD1 PORTIO_8(IO_BASE + 0x12f) /* port AD1 data input register */
|
399 |
|
|
#define ATD1DR0 PORTIO_16(IO_BASE + 0x130) /* A/D1 result 0 */
|
400 |
|
|
#define ATD1DR0H PORTIO_8(IO_BASE + 0x130) /* A/D1 result 0 */
|
401 |
|
|
#define ATD1DR1 PORTIO_16(IO_BASE + 0x132) /* A/D1 result 1 */
|
402 |
|
|
#define ATD1DR1H PORTIO_8(IO_BASE + 0x132) /* A/D1 result 1 */
|
403 |
|
|
#define ATD1DR2 PORTIO_16(IO_BASE + 0x134) /* A/D1 result 2 */
|
404 |
|
|
#define ATD1DR2H PORTIO_8(IO_BASE + 0x134) /* A/D1 result 2 */
|
405 |
|
|
#define ATD1DR3 PORTIO_16(IO_BASE + 0x136) /* A/D1 result 3 */
|
406 |
|
|
#define ATD1DR3H PORTIO_8(IO_BASE + 0x136) /* A/D1 result 3 */
|
407 |
|
|
#define ATD1DR4 PORTIO_16(IO_BASE + 0x138) /* A/D1 result 4 */
|
408 |
|
|
#define ATD1DR4H PORTIO_8(IO_BASE + 0x138) /* A/D1 result 4 */
|
409 |
|
|
#define ATD1DR5 PORTIO_16(IO_BASE + 0x13a) /* A/D1 result 5 */
|
410 |
|
|
#define ATD1DR5H PORTIO_8(IO_BASE + 0x13a) /* A/D1 result 5 */
|
411 |
|
|
#define ATD1DR6 PORTIO_16(IO_BASE + 0x13c) /* A/D1 result 6 */
|
412 |
|
|
#define ATD1DR6H PORTIO_8(IO_BASE + 0x13c) /* A/D1 result 6 */
|
413 |
|
|
#define ATD1DR7 PORTIO_16(IO_BASE + 0x13e) /* A/D1 result 7 */
|
414 |
|
|
#define ATD1DR7H PORTIO_8(IO_BASE + 0x13e) /* A/D1 result 7 */
|
415 |
|
|
|
416 |
|
|
/* CAN0 Module
|
417 |
|
|
*/
|
418 |
|
|
#define CAN0_BASE (IO_BASE + 0x140)
|
419 |
|
|
#define CAN0CTL0 PORTIO_8(IO_BASE + 0x140) /* CAN0 control register 0 */
|
420 |
|
|
#define CAN0CTL1 PORTIO_8(IO_BASE + 0x141) /* CAN0 control register 1 */
|
421 |
|
|
#define CAN0BTR0 PORTIO_8(IO_BASE + 0x142) /* CAN0 bus timing register 0 */
|
422 |
|
|
#define CAN0BTR1 PORTIO_8(IO_BASE + 0x143) /* CAN0 bus timing register 1 */
|
423 |
|
|
#define CAN0RFLG PORTIO_8(IO_BASE + 0x144) /* CAN0 receiver flag register */
|
424 |
|
|
#define CAN0RIER PORTIO_8(IO_BASE + 0x145) /* CAN0 receiver interrupt reg */
|
425 |
|
|
#define CAN0TFLG PORTIO_8(IO_BASE + 0x146) /* CAN0 transmitter flag reg */
|
426 |
|
|
#define CAN0TIER PORTIO_8(IO_BASE + 0x147) /* CAN0 transmitter control reg */
|
427 |
|
|
#define CAN0TARQ PORTIO_8(IO_BASE + 0x148) /* CAN0 transmitter abort request */
|
428 |
|
|
#define CAN0TAAK PORTIO_8(IO_BASE + 0x149) /* CAN0 transmitter abort acknowledge */
|
429 |
|
|
#define CAN0TBSEL PORTIO_8(IO_BASE + 0x14a) /* CAN0 transmit buffer selection */
|
430 |
|
|
#define CAN0IDAC PORTIO_8(IO_BASE + 0x14b) /* CAN0 identifier acceptance */
|
431 |
|
|
#define CAN0RXERR PORTIO_8(IO_BASE + 0x14e) /* CAN0 receive error counter */
|
432 |
|
|
#define CAN0TXERR PORTIO_8(IO_BASE + 0x14f) /* CAN0 transmit error counter */
|
433 |
|
|
#define CAN0IDAR0 PORTIO_8(IO_BASE + 0x150) /* CAN0 id acceptance reg 0 */
|
434 |
|
|
#define CAN0IDAR1 PORTIO_8(IO_BASE + 0x151) /* CAN0 id acceptance reg 1 */
|
435 |
|
|
#define CAN0IDAR2 PORTIO_8(IO_BASE + 0x152) /* CAN0 id acceptance reg 2 */
|
436 |
|
|
#define CAN0IDAR3 PORTIO_8(IO_BASE + 0x153) /* CAN0 id acceptance reg 3 */
|
437 |
|
|
#define CAN0IDMR0 PORTIO_8(IO_BASE + 0x154) /* CAN0 id mask register 0 */
|
438 |
|
|
#define CAN0IDMR1 PORTIO_8(IO_BASE + 0x155) /* CAN0 id mask register 1 */
|
439 |
|
|
#define CAN0IDMR2 PORTIO_8(IO_BASE + 0x156) /* CAN0 id mask register 2 */
|
440 |
|
|
#define CAN0IDMR3 PORTIO_8(IO_BASE + 0x157) /* CAN0 id mask register 3 */
|
441 |
|
|
#define CAN0IDAR4 PORTIO_8(IO_BASE + 0x158) /* CAN0 id acceptance reg 4 */
|
442 |
|
|
#define CAN0IDAR5 PORTIO_8(IO_BASE + 0x159) /* CAN0 id acceptance reg 5 */
|
443 |
|
|
#define CAN0IDAR6 PORTIO_8(IO_BASE + 0x15a) /* CAN0 id acceptance reg 6 */
|
444 |
|
|
#define CAN0IDAR7 PORTIO_8(IO_BASE + 0x15b) /* CAN0 id acceptance reg 7 */
|
445 |
|
|
#define CAN0IDMR4 PORTIO_8(IO_BASE + 0x15c) /* CAN0 id mask register 4 */
|
446 |
|
|
#define CAN0IDMR5 PORTIO_8(IO_BASE + 0x15d) /* CAN0 id mask register 5 */
|
447 |
|
|
#define CAN0IDMR6 PORTIO_8(IO_BASE + 0x15e) /* CAN0 id mask register 6 */
|
448 |
|
|
#define CAN0IDMR7 PORTIO_8(IO_BASE + 0x15f) /* CAN0 id mask register 7 */
|
449 |
|
|
#define CAN0RXFG PORTIO_8(IO_BASE + 0x160) /* CAN0 receive buffer */
|
450 |
|
|
#define CAN0TXFG PORTIO_8(IO_BASE + 0x170) /* CAN0 transmit buffer */
|
451 |
|
|
|
452 |
|
|
/* CAN1 Module
|
453 |
|
|
*/
|
454 |
|
|
#define CAN1_BASE (IO_BASE + 0x180)
|
455 |
|
|
#define CAN1CTL0 PORTIO_8(IO_BASE + 0x180) /* CAN1 control register 0 */
|
456 |
|
|
#define CAN1CTL1 PORTIO_8(IO_BASE + 0x181) /* CAN1 control register 1 */
|
457 |
|
|
#define CAN1BTR0 PORTIO_8(IO_BASE + 0x182) /* CAN1 bus timing register 0 */
|
458 |
|
|
#define CAN1BTR1 PORTIO_8(IO_BASE + 0x183) /* CAN1 bus timing register 1 */
|
459 |
|
|
#define CAN1RFLG PORTIO_8(IO_BASE + 0x184) /* CAN1 receiver flag register */
|
460 |
|
|
#define CAN1RIER PORTIO_8(IO_BASE + 0x185) /* CAN1 receiver interrupt reg */
|
461 |
|
|
#define CAN1TFLG PORTIO_8(IO_BASE + 0x186) /* CAN1 transmitter flag reg */
|
462 |
|
|
#define CAN1TIER PORTIO_8(IO_BASE + 0x187) /* CAN1 transmitter control reg */
|
463 |
|
|
#define CAN1TARQ PORTIO_8(IO_BASE + 0x188) /* CAN1 transmitter abort request */
|
464 |
|
|
#define CAN1TAAK PORTIO_8(IO_BASE + 0x189) /* CAN1 transmitter abort acknowledge */
|
465 |
|
|
#define CAN1TBSEL PORTIO_8(IO_BASE + 0x18a) /* CAN1 transmit buffer selection */
|
466 |
|
|
#define CAN1IDAC PORTIO_8(IO_BASE + 0x18b) /* CAN1 identifier acceptance */
|
467 |
|
|
#define CAN1RXERR PORTIO_8(IO_BASE + 0x18e) /* CAN1 transmitter control reg */
|
468 |
|
|
#define CAN1TXERR PORTIO_8(IO_BASE + 0x18f) /* CAN1 transmit error counter */
|
469 |
|
|
#define CAN1IDAR0 PORTIO_8(IO_BASE + 0x190) /* CAN1 id acceptance reg 0 */
|
470 |
|
|
#define CAN1IDAR1 PORTIO_8(IO_BASE + 0x191) /* CAN1 id acceptance reg 1 */
|
471 |
|
|
#define CAN1IDAR2 PORTIO_8(IO_BASE + 0x192) /* CAN1 id acceptance reg 2 */
|
472 |
|
|
#define CAN1IDAR3 PORTIO_8(IO_BASE + 0x193) /* CAN1 id acceptance reg 3 */
|
473 |
|
|
#define CAN1IDMR0 PORTIO_8(IO_BASE + 0x194) /* CAN1 id mask register 0 */
|
474 |
|
|
#define CAN1IDMR1 PORTIO_8(IO_BASE + 0x195) /* CAN1 id mask register 1 */
|
475 |
|
|
#define CAN1IDMR2 PORTIO_8(IO_BASE + 0x196) /* CAN1 id mask register 2 */
|
476 |
|
|
#define CAN1IDMR3 PORTIO_8(IO_BASE + 0x197) /* CAN1 id mask register 3 */
|
477 |
|
|
#define CAN1IDAR4 PORTIO_8(IO_BASE + 0x198) /* CAN1 id acceptance reg 4 */
|
478 |
|
|
#define CAN1IDAR5 PORTIO_8(IO_BASE + 0x199) /* CAN1 id acceptance reg 5 */
|
479 |
|
|
#define CAN1IDAR6 PORTIO_8(IO_BASE + 0x19a) /* CAN1 id acceptance reg 6 */
|
480 |
|
|
#define CAN1IDAR7 PORTIO_8(IO_BASE + 0x19b) /* CAN1 id acceptance reg 7 */
|
481 |
|
|
#define CAN1IDMR4 PORTIO_8(IO_BASE + 0x19c) /* CAN1 id mask register 4 */
|
482 |
|
|
#define CAN1IDMR5 PORTIO_8(IO_BASE + 0x19d) /* CAN1 id mask register 5 */
|
483 |
|
|
#define CAN1IDMR6 PORTIO_8(IO_BASE + 0x19e) /* CAN1 id mask register 6 */
|
484 |
|
|
#define CAN1IDMR7 PORTIO_8(IO_BASE + 0x19f) /* CAN1 id mask register 7 */
|
485 |
|
|
#define CAN1RXFG PORTIO_8(IO_BASE + 0x1a0) /* CAN1 receive buffer */
|
486 |
|
|
#define CAN1TXFG PORTIO_8(IO_BASE + 0x1b0) /* CAN1 transmit buffer */
|
487 |
|
|
|
488 |
|
|
/* CAN2 Module
|
489 |
|
|
*/
|
490 |
|
|
#define CAN2_BASE (IO_BASE + 0x1c0)
|
491 |
|
|
#define CAN2CTL0 PORTIO_8(IO_BASE + 0x1c0) /* CAN2 control register 0 */
|
492 |
|
|
#define CAN2CTL1 PORTIO_8(IO_BASE + 0x1c1) /* CAN2 control register 1 */
|
493 |
|
|
#define CAN2BTR0 PORTIO_8(IO_BASE + 0x1c2) /* CAN2 bus timing register 0 */
|
494 |
|
|
#define CAN2BTR1 PORTIO_8(IO_BASE + 0x1c3) /* CAN2 bus timing register 1 */
|
495 |
|
|
#define CAN2RFLG PORTIO_8(IO_BASE + 0x1c4) /* CAN2 receiver flag register */
|
496 |
|
|
#define CAN2RIER PORTIO_8(IO_BASE + 0x1c5) /* CAN2 receiver interrupt reg */
|
497 |
|
|
#define CAN2TFLG PORTIO_8(IO_BASE + 0x1c6) /* CAN2 transmitter flag reg */
|
498 |
|
|
#define CAN2TIER PORTIO_8(IO_BASE + 0x1c7) /* CAN2 transmitter control reg */
|
499 |
|
|
#define CAN2TARQ PORTIO_8(IO_BASE + 0x1c8) /* CAN2 transmitter abort request */
|
500 |
|
|
#define CAN2TAAK PORTIO_8(IO_BASE + 0x1c9) /* CAN2 transmitter abort acknowledge */
|
501 |
|
|
#define CAN2TBSEL PORTIO_8(IO_BASE + 0x1ca) /* CAN2 transmit buffer selection */
|
502 |
|
|
#define CAN2IDAC PORTIO_8(IO_BASE + 0x1cb) /* CAN2 identifier acceptance */
|
503 |
|
|
#define CAN2RXERR PORTIO_8(IO_BASE + 0x1ce) /* CAN2 transmitter control reg */
|
504 |
|
|
#define CAN2TXERR PORTIO_8(IO_BASE + 0x1cf) /* CAN2 transmit error counter */
|
505 |
|
|
#define CAN2IDAR0 PORTIO_8(IO_BASE + 0x1d0) /* CAN2 id acceptance reg 0 */
|
506 |
|
|
#define CAN2IDAR1 PORTIO_8(IO_BASE + 0x1d1) /* CAN2 id acceptance reg 1 */
|
507 |
|
|
#define CAN2IDAR2 PORTIO_8(IO_BASE + 0x1d2) /* CAN2 id acceptance reg 2 */
|
508 |
|
|
#define CAN2IDAR3 PORTIO_8(IO_BASE + 0x1d3) /* CAN2 id acceptance reg 3 */
|
509 |
|
|
#define CAN2IDMR0 PORTIO_8(IO_BASE + 0x1d4) /* CAN2 id mask register 0 */
|
510 |
|
|
#define CAN2IDMR1 PORTIO_8(IO_BASE + 0x1d5) /* CAN2 id mask register 1 */
|
511 |
|
|
#define CAN2IDMR2 PORTIO_8(IO_BASE + 0x1d6) /* CAN2 id mask register 2 */
|
512 |
|
|
#define CAN2IDMR3 PORTIO_8(IO_BASE + 0x1d7) /* CAN2 id mask register 3 */
|
513 |
|
|
#define CAN2IDAR4 PORTIO_8(IO_BASE + 0x1d8) /* CAN2 id acceptance reg 4 */
|
514 |
|
|
#define CAN2IDAR5 PORTIO_8(IO_BASE + 0x1d9) /* CAN2 id acceptance reg 5 */
|
515 |
|
|
#define CAN2IDAR6 PORTIO_8(IO_BASE + 0x1da) /* CAN2 id acceptance reg 6 */
|
516 |
|
|
#define CAN2IDAR7 PORTIO_8(IO_BASE + 0x1db) /* CAN2 id acceptance reg 7 */
|
517 |
|
|
#define CAN2IDMR4 PORTIO_8(IO_BASE + 0x1dc) /* CAN2 id mask register 4 */
|
518 |
|
|
#define CAN2IDMR5 PORTIO_8(IO_BASE + 0x1dd) /* CAN2 id mask register 5 */
|
519 |
|
|
#define CAN2IDMR6 PORTIO_8(IO_BASE + 0x1de) /* CAN2 id mask register 6 */
|
520 |
|
|
#define CAN2IDMR7 PORTIO_8(IO_BASE + 0x1df) /* CAN2 id mask register 7 */
|
521 |
|
|
#define CAN2RXFG PORTIO_8(IO_BASE + 0x1e0) /* CAN2 receive buffer */
|
522 |
|
|
#define CAN2TXFG PORTIO_8(IO_BASE + 0x1f0) /* CAN2 transmit buffer */
|
523 |
|
|
|
524 |
|
|
/* CAN3 Module
|
525 |
|
|
*/
|
526 |
|
|
#define CAN3_BASE (IO_BASE + 0x200)
|
527 |
|
|
#define CAN3CTL0 PORTIO_8(IO_BASE + 0x200) /* CAN3 control register 0 */
|
528 |
|
|
#define CAN3CTL1 PORTIO_8(IO_BASE + 0x201) /* CAN3 control register 1 */
|
529 |
|
|
#define CAN3BTR0 PORTIO_8(IO_BASE + 0x202) /* CAN3 bus timing register 0 */
|
530 |
|
|
#define CAN3BTR1 PORTIO_8(IO_BASE + 0x203) /* CAN3 bus timing register 1 */
|
531 |
|
|
#define CAN3RFLG PORTIO_8(IO_BASE + 0x204) /* CAN3 receiver flag register */
|
532 |
|
|
#define CAN3RIER PORTIO_8(IO_BASE + 0x205) /* CAN3 receiver interrupt reg */
|
533 |
|
|
#define CAN3TFLG PORTIO_8(IO_BASE + 0x206) /* CAN3 transmitter flag reg */
|
534 |
|
|
#define CAN3TIER PORTIO_8(IO_BASE + 0x207) /* CAN3 transmitter control reg */
|
535 |
|
|
#define CAN3TARQ PORTIO_8(IO_BASE + 0x208) /* CAN3 transmitter abort request */
|
536 |
|
|
#define CAN3TAAK PORTIO_8(IO_BASE + 0x209) /* CAN3 transmitter abort acknowledge */
|
537 |
|
|
#define CAN3TBSEL PORTIO_8(IO_BASE + 0x20a) /* CAN3 transmit buffer selection */
|
538 |
|
|
#define CAN3IDAC PORTIO_8(IO_BASE + 0x20b) /* CAN3 identifier acceptance */
|
539 |
|
|
#define CAN3RXERR PORTIO_8(IO_BASE + 0x20e) /* CAN3 transmitter control reg */
|
540 |
|
|
#define CAN3TXERR PORTIO_8(IO_BASE + 0x20f) /* CAN3 transmit error counter */
|
541 |
|
|
#define CAN3IDAR0 PORTIO_8(IO_BASE + 0x210) /* CAN3 id acceptance reg 0 */
|
542 |
|
|
#define CAN3IDAR1 PORTIO_8(IO_BASE + 0x211) /* CAN3 id acceptance reg 1 */
|
543 |
|
|
#define CAN3IDAR2 PORTIO_8(IO_BASE + 0x212) /* CAN3 id acceptance reg 2 */
|
544 |
|
|
#define CAN3IDAR3 PORTIO_8(IO_BASE + 0x213) /* CAN3 id acceptance reg 3 */
|
545 |
|
|
#define CAN3IDMR0 PORTIO_8(IO_BASE + 0x214) /* CAN3 id mask register 0 */
|
546 |
|
|
#define CAN3IDMR1 PORTIO_8(IO_BASE + 0x215) /* CAN3 id mask register 1 */
|
547 |
|
|
#define CAN3IDMR2 PORTIO_8(IO_BASE + 0x216) /* CAN3 id mask register 2 */
|
548 |
|
|
#define CAN3IDMR3 PORTIO_8(IO_BASE + 0x217) /* CAN3 id mask register 3 */
|
549 |
|
|
#define CAN3IDAR4 PORTIO_8(IO_BASE + 0x218) /* CAN3 id acceptance reg 4 */
|
550 |
|
|
#define CAN3IDAR5 PORTIO_8(IO_BASE + 0x219) /* CAN3 id acceptance reg 5 */
|
551 |
|
|
#define CAN3IDAR6 PORTIO_8(IO_BASE + 0x21a) /* CAN3 id acceptance reg 6 */
|
552 |
|
|
#define CAN3IDAR7 PORTIO_8(IO_BASE + 0x21b) /* CAN3 id acceptance reg 7 */
|
553 |
|
|
#define CAN3IDMR4 PORTIO_8(IO_BASE + 0x21c) /* CAN3 id mask register 4 */
|
554 |
|
|
#define CAN3IDMR5 PORTIO_8(IO_BASE + 0x21d) /* CAN3 id mask register 5 */
|
555 |
|
|
#define CAN3IDMR6 PORTIO_8(IO_BASE + 0x21e) /* CAN3 id mask register 6 */
|
556 |
|
|
#define CAN3IDMR7 PORTIO_8(IO_BASE + 0x21f) /* CAN3 id mask register 7 */
|
557 |
|
|
#define CAN3RXFG PORTIO_8(IO_BASE + 0x220) /* CAN3 receive buffer */
|
558 |
|
|
#define CAN3TXFG PORTIO_8(IO_BASE + 0x230) /* CAN3 transmit buffer */
|
559 |
|
|
|
560 |
|
|
/* PIM
|
561 |
|
|
*/
|
562 |
|
|
|
563 |
|
|
/*Port T register offsets
|
564 |
|
|
*/
|
565 |
|
|
#define PTT PORTIO_8(IO_BASE + 0x240) /* port T data register */
|
566 |
|
|
#define PTIT PORTIO_8(IO_BASE + 0x241) /* port T input register */
|
567 |
|
|
#define DDRT PORTIO_8(IO_BASE + 0x242) /* port T data direction */
|
568 |
|
|
#define RDRT PORTIO_8(IO_BASE + 0x243) /* port T reduce drive */
|
569 |
|
|
#define PERT PORTIO_8(IO_BASE + 0x244) /* port T pull enable */
|
570 |
|
|
#define PPST PORTIO_8(IO_BASE + 0x245) /* port T polarity select */
|
571 |
|
|
|
572 |
|
|
/*Port S
|
573 |
|
|
*/
|
574 |
|
|
#define PTS PORTIO_8(IO_BASE + 0x248) /* port S data register */
|
575 |
|
|
#define PTIS PORTIO_8(IO_BASE + 0x249) /* port S input register */
|
576 |
|
|
#define DDRS PORTIO_8(IO_BASE + 0x24a) /* port S data direction */
|
577 |
|
|
#define RDRS PORTIO_8(IO_BASE + 0x24b) /* port S reduce drive */
|
578 |
|
|
#define PERS PORTIO_8(IO_BASE + 0x24c) /* port S pull enable */
|
579 |
|
|
#define PPSS PORTIO_8(IO_BASE + 0x24d) /* port S polarity select */
|
580 |
|
|
#define WOMS PORTIO_8(IO_BASE + 0x24e) /* port S wired-or mode */
|
581 |
|
|
|
582 |
|
|
/* Port M
|
583 |
|
|
*/
|
584 |
|
|
#define PTM PORTIO_8(IO_BASE + 0x250) /* port M data register */
|
585 |
|
|
#define PTIM PORTIO_8(IO_BASE + 0x251) /* port M input register */
|
586 |
|
|
#define DDRM PORTIO_8(IO_BASE + 0x252) /* port M data direction */
|
587 |
|
|
#define RDRM PORTIO_8(IO_BASE + 0x253) /* port M reduce drive */
|
588 |
|
|
#define PERM PORTIO_8(IO_BASE + 0x254) /* port M pull enable */
|
589 |
|
|
#define PPSM PORTIO_8(IO_BASE + 0x255) /* port M polarity select */
|
590 |
|
|
#define WOMM PORTIO_8(IO_BASE + 0x256) /* port M wired-or mode */
|
591 |
|
|
|
592 |
|
|
/* Port P
|
593 |
|
|
*/
|
594 |
|
|
#define PTP PORTIO_8(IO_BASE + 0x258) /* port P data register */
|
595 |
|
|
#define PTIP PORTIO_8(IO_BASE + 0x259) /* port P input register */
|
596 |
|
|
#define DDRP PORTIO_8(IO_BASE + 0x25a) /* port P data direction */
|
597 |
|
|
#define RDRP PORTIO_8(IO_BASE + 0x25b) /* port P reduce drive */
|
598 |
|
|
#define PERP PORTIO_8(IO_BASE + 0x25c) /* port P pull enable */
|
599 |
|
|
#define PPSP PORTIO_8(IO_BASE + 0x25d) /* port P polarity select */
|
600 |
|
|
#define PIEP PORTIO_8(IO_BASE + 0x25e) /* port P interrupt enable */
|
601 |
|
|
#define PIFP PORTIO_8(IO_BASE + 0x25f) /* port P interrupt flag */
|
602 |
|
|
|
603 |
|
|
/* Port H
|
604 |
|
|
*/
|
605 |
|
|
#define PTH PORTIO_8(IO_BASE + 0x260) /* port H data register */
|
606 |
|
|
#define PTIH PORTIO_8(IO_BASE + 0x261) /* port H input register */
|
607 |
|
|
#define DDRH PORTIO_8(IO_BASE + 0x262) /* port H data direction */
|
608 |
|
|
#define RDRH PORTIO_8(IO_BASE + 0x263) /* port H reduce drive */
|
609 |
|
|
#define PERH PORTIO_8(IO_BASE + 0x264) /* port H pull enable */
|
610 |
|
|
#define PPSH PORTIO_8(IO_BASE + 0x265) /* port H polarity select */
|
611 |
|
|
#define PIEH PORTIO_8(IO_BASE + 0x266) /* port H interrupt enable */
|
612 |
|
|
#define PIFH PORTIO_8(IO_BASE + 0x267) /* port H interrupt flag */
|
613 |
|
|
|
614 |
|
|
/* Port J
|
615 |
|
|
*/
|
616 |
|
|
#define PTJ PORTIO_8(IO_BASE + 0x268) /* port J data register */
|
617 |
|
|
#define PTIJ PORTIO_8(IO_BASE + 0x269) /* port J input register */
|
618 |
|
|
#define DDRJ PORTIO_8(IO_BASE + 0x26a) /* port J data direction */
|
619 |
|
|
#define RDRJ PORTIO_8(IO_BASE + 0x26b) /* port J reduce drive */
|
620 |
|
|
#define PERJ PORTIO_8(IO_BASE + 0x26c) /* port J pull enable */
|
621 |
|
|
#define PPSJ PORTIO_8(IO_BASE + 0x26d) /* port J polarity select */
|
622 |
|
|
#define PIEJ PORTIO_8(IO_BASE + 0x26e) /* port J interrupt enable */
|
623 |
|
|
#define PIFJ PORTIO_8(IO_BASE + 0x26f) /* port J interrupt flag */
|
624 |
|
|
/*PIM end
|
625 |
|
|
*/
|
626 |
|
|
|
627 |
|
|
|
628 |
|
|
/* CAN4 Module
|
629 |
|
|
*/
|
630 |
|
|
#define CAN4_BASE (IO_BASE + 0x280)
|
631 |
|
|
#define CAN4CTL0 PORTIO_8(IO_BASE + 0x280) /* CAN4 control register 0 */
|
632 |
|
|
#define CAN4CTL1 PORTIO_8(IO_BASE + 0x281) /* CAN4 control register 1 */
|
633 |
|
|
#define CAN4BTR0 PORTIO_8(IO_BASE + 0x282) /* CAN4 bus timing register 0 */
|
634 |
|
|
#define CAN4BTR1 PORTIO_8(IO_BASE + 0x283) /* CAN4 bus timing register 1 */
|
635 |
|
|
#define CAN4RFLG PORTIO_8(IO_BASE + 0x284) /* CAN4 receiver flag register */
|
636 |
|
|
#define CAN4RIER PORTIO_8(IO_BASE + 0x285) /* CAN4 receiver interrupt reg */
|
637 |
|
|
#define CAN4TFLG PORTIO_8(IO_BASE + 0x286) /* CAN4 transmitter flag reg */
|
638 |
|
|
#define CAN4TIER PORTIO_8(IO_BASE + 0x287) /* CAN4 transmitter control reg */
|
639 |
|
|
#define CAN4TARQ PORTIO_8(IO_BASE + 0x288) /* CAN4 transmitter abort request */
|
640 |
|
|
#define CAN4TAAK PORTIO_8(IO_BASE + 0x289) /* CAN4 transmitter abort acknowledge */
|
641 |
|
|
#define CAN4TBSEL PORTIO_8(IO_BASE + 0x28a) /* CAN4 transmit buffer selection */
|
642 |
|
|
#define CAN4IDAC PORTIO_8(IO_BASE + 0x28b) /* CAN4 identifier acceptance */
|
643 |
|
|
#define CAN4RXERR PORTIO_8(IO_BASE + 0x28e) /* CAN4 transmitter control reg */
|
644 |
|
|
#define CAN4TXERR PORTIO_8(IO_BASE + 0x28f) /* CAN4 transmit error counter */
|
645 |
|
|
#define CAN4IDAR0 PORTIO_8(IO_BASE + 0x290) /* CAN4 id acceptance reg 0 */
|
646 |
|
|
#define CAN4IDAR1 PORTIO_8(IO_BASE + 0x291) /* CAN4 id acceptance reg 1 */
|
647 |
|
|
#define CAN4IDAR2 PORTIO_8(IO_BASE + 0x292) /* CAN4 id acceptance reg 2 */
|
648 |
|
|
#define CAN4IDAR3 PORTIO_8(IO_BASE + 0x293) /* CAN4 id acceptance reg 3 */
|
649 |
|
|
#define CAN4IDMR0 PORTIO_8(IO_BASE + 0x294) /* CAN4 id mask register 0 */
|
650 |
|
|
#define CAN4IDMR1 PORTIO_8(IO_BASE + 0x295) /* CAN4 id mask register 1 */
|
651 |
|
|
#define CAN4IDMR2 PORTIO_8(IO_BASE + 0x296) /* CAN4 id mask register 2 */
|
652 |
|
|
#define CAN4IDMR3 PORTIO_8(IO_BASE + 0x297) /* CAN4 id mask register 3 */
|
653 |
|
|
#define CAN4IDAR4 PORTIO_8(IO_BASE + 0x298) /* CAN4 id acceptance reg 4 */
|
654 |
|
|
#define CAN4IDAR5 PORTIO_8(IO_BASE + 0x299) /* CAN4 id acceptance reg 5 */
|
655 |
|
|
#define CAN4IDAR6 PORTIO_8(IO_BASE + 0x29a) /* CAN4 id acceptance reg 6 */
|
656 |
|
|
#define CAN4IDAR7 PORTIO_8(IO_BASE + 0x29b) /* CAN4 id acceptance reg 7 */
|
657 |
|
|
#define CAN4IDMR4 PORTIO_8(IO_BASE + 0x29c) /* CAN4 id mask register 4 */
|
658 |
|
|
#define CAN4IDMR5 PORTIO_8(IO_BASE + 0x29d) /* CAN4 id mask register 5 */
|
659 |
|
|
#define CAN4IDMR6 PORTIO_8(IO_BASE + 0x29e) /* CAN4 id mask register 6 */
|
660 |
|
|
#define CAN4IDMR7 PORTIO_8(IO_BASE + 0x29f) /* CAN4 id mask register 7 */
|
661 |
|
|
#define CAN4RXFG PORTIO_8(IO_BASE + 0x2a0) /* CAN4 receive buffer */
|
662 |
|
|
#define CAN4TXFG PORTIO_8(IO_BASE + 0x2b0) /* CAN4 transmit buffer */
|
663 |
|
|
|
664 |
|
|
|
665 |
|
|
#endif
|
666 |
|
|
|