* src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
[fw/sdcc] / device / include / mc68hc908jb8.h
1 /*-------------------------------------------------------------------------
2   Register Declarations for Motorola MC68HC908JB8
3   
4   Copyright (c) 2004, Bjorn Bringert <bjorn@bringert.net>
5
6   Based on mc68hc908qy.h,
7    Written By - Erik Petrich
8     epetrich@users.sourceforge.net (2003)
9     
10    This program is free software; you can redistribute it and/or modify it
11    under the terms of the GNU General Public License as published by the
12    Free Software Foundation; either version 2, or (at your option) any
13    later version.
14    
15    This program is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18    GNU General Public License for more details.
19    
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23    
24    In other words, you are welcome to use, share and improve this program.
25    You are forbidden to forbid anyone else to use, share and improve
26    what you give them.   Help stamp out software-hoarding!  
27 -------------------------------------------------------------------------*/
28
29 #ifndef MC68HC908JB8_H
30 #define MC68HC908JB8_H
31
32 #ifndef UINT8
33  #define UINT8 unsigned char
34 #endif
35 #ifndef UINT16
36  #define UINT16 unsigned int
37 #endif
38 #ifndef VOLDATA
39  #define VOLDATA volatile data
40 #endif
41 #ifndef VOLXDATA
42  #define VOLXDATA volatile xdata
43 #endif
44
45 struct _hc08_bits
46 {
47   unsigned int bit0:1;
48   unsigned int bit1:1;
49   unsigned int bit2:1;
50   unsigned int bit3:1;
51   unsigned int bit4:1;
52   unsigned int bit5:1;
53   unsigned int bit6:1;
54   unsigned int bit7:1;
55 };
56   
57
58 VOLDATA UINT8 at 0x00 PTA;     /* Port A Data Register */
59   #define PTA0 ((struct _hc08_bits *)(&PTA))->bit0
60   #define PTA1 ((struct _hc08_bits *)(&PTA))->bit1
61   #define PTA2 ((struct _hc08_bits *)(&PTA))->bit2
62   #define PTA3 ((struct _hc08_bits *)(&PTA))->bit3
63   #define PTA4 ((struct _hc08_bits *)(&PTA))->bit4
64   #define PTA5 ((struct _hc08_bits *)(&PTA))->bit5
65   #define AWUL ((struct _hc08_bits *)(&PTA))->bit6
66   
67 VOLDATA UINT8 at 0x01 PTB;     /* Port B Data Register */
68   #define PTB0 ((struct _hc08_bits *)(&PTB))->bit0
69   #define PTB1 ((struct _hc08_bits *)(&PTB))->bit1
70   #define PTB2 ((struct _hc08_bits *)(&PTB))->bit2
71   #define PTB3 ((struct _hc08_bits *)(&PTB))->bit3
72   #define PTB4 ((struct _hc08_bits *)(&PTB))->bit4
73   #define PTB5 ((struct _hc08_bits *)(&PTB))->bit5
74   #define PTB6 ((struct _hc08_bits *)(&PTB))->bit6
75   #define PTB7 ((struct _hc08_bits *)(&PTB))->bit7
76
77 VOLDATA UINT8 at 0x02 PTC;     /* Port C Data Register */
78   #define PTC0 ((struct _hc08_bits *)(&PTC))->bit0
79   #define PTC1 ((struct _hc08_bits *)(&PTC))->bit1
80   #define PTC2 ((struct _hc08_bits *)(&PTC))->bit2
81   #define PTC3 ((struct _hc08_bits *)(&PTC))->bit3
82   #define PTC4 ((struct _hc08_bits *)(&PTC))->bit4
83   #define PTC5 ((struct _hc08_bits *)(&PTC))->bit5
84   #define PTC6 ((struct _hc08_bits *)(&PTC))->bit6
85   #define PTC7 ((struct _hc08_bits *)(&PTC))->bit7
86
87 VOLDATA UINT8 at 0x03 PTD;     /* Port D Data Register */
88   #define PTD0 ((struct _hc08_bits *)(&PTD))->bit0
89   #define PTD1 ((struct _hc08_bits *)(&PTD))->bit1
90   #define PTD2 ((struct _hc08_bits *)(&PTD))->bit2
91   #define PTD3 ((struct _hc08_bits *)(&PTD))->bit3
92   #define PTD4 ((struct _hc08_bits *)(&PTD))->bit4
93   #define PTD5 ((struct _hc08_bits *)(&PTD))->bit5
94   #define PTD6 ((struct _hc08_bits *)(&PTD))->bit6
95   #define PTD7 ((struct _hc08_bits *)(&PTD))->bit7
96
97 VOLDATA UINT8 at 0x04 DDRA;    /* Data Direction Register A */
98   #define DDRA0 ((struct _hc08_bits *)(&DDRA))->bit0
99   #define DDRA1 ((struct _hc08_bits *)(&DDRA))->bit1
100   #define DDRA2 ((struct _hc08_bits *)(&DDRA))->bit2
101   #define DDRA3 ((struct _hc08_bits *)(&DDRA))->bit3
102   #define DDRA4 ((struct _hc08_bits *)(&DDRA))->bit4
103   #define DDRA5 ((struct _hc08_bits *)(&DDRA))->bit5
104   #define DDRA6 ((struct _hc08_bits *)(&DDRA))->bit6
105   #define DDRA7 ((struct _hc08_bits *)(&DDRA))->bit7
106
107 VOLDATA UINT8 at 0x05 DDRB;    /* Data Direction Register B */
108   #define DDRB0 ((struct _hc08_bits *)(&DDRB))->bit0
109   #define DDRB1 ((struct _hc08_bits *)(&DDRB))->bit1
110   #define DDRB2 ((struct _hc08_bits *)(&DDRB))->bit2
111   #define DDRB3 ((struct _hc08_bits *)(&DDRB))->bit3
112   #define DDRB4 ((struct _hc08_bits *)(&DDRB))->bit4
113   #define DDRB5 ((struct _hc08_bits *)(&DDRB))->bit5
114   #define DDRB6 ((struct _hc08_bits *)(&DDRB))->bit6
115   #define DDRB7 ((struct _hc08_bits *)(&DDRB))->bit7
116
117 VOLDATA UINT8 at 0x06 DDRC;    /* Data Direction Register C */
118   #define DDRC0 ((struct _hc08_bits *)(&DDRC))->bit0
119   #define DDRC1 ((struct _hc08_bits *)(&DDRC))->bit1
120   #define DDRC2 ((struct _hc08_bits *)(&DDRC))->bit2
121   #define DDRC3 ((struct _hc08_bits *)(&DDRC))->bit3
122   #define DDRC4 ((struct _hc08_bits *)(&DDRC))->bit4
123   #define DDRC5 ((struct _hc08_bits *)(&DDRC))->bit5
124   #define DDRC6 ((struct _hc08_bits *)(&DDRC))->bit6
125   #define DDRC7 ((struct _hc08_bits *)(&DDRC))->bit7
126
127 VOLDATA UINT8 at 0x07 DDRD;    /* Data Direction Register D */
128   #define DDRD0 ((struct _hc08_bits *)(&DDRD))->bit0
129   #define DDRD1 ((struct _hc08_bits *)(&DDRD))->bit1
130   #define DDRD2 ((struct _hc08_bits *)(&DDRD))->bit2
131   #define DDRD3 ((struct _hc08_bits *)(&DDRD))->bit3
132   #define DDRD4 ((struct _hc08_bits *)(&DDRD))->bit4
133   #define DDRD5 ((struct _hc08_bits *)(&DDRD))->bit5
134   #define DDRD6 ((struct _hc08_bits *)(&DDRD))->bit6
135   #define DDRD7 ((struct _hc08_bits *)(&DDRD))->bit7
136
137 VOLDATA UINT8 at 0x08 PTE;     /* Port E Data Register */
138   #define PTE0 ((struct _hc08_bits *)(&PTE))->bit0
139   #define PTE1 ((struct _hc08_bits *)(&PTE))->bit1
140   #define PTE2 ((struct _hc08_bits *)(&PTE))->bit2
141   #define PTE3 ((struct _hc08_bits *)(&PTE))->bit3
142   #define PTE4 ((struct _hc08_bits *)(&PTE))->bit4
143   #define PTE5 ((struct _hc08_bits *)(&PTE))->bit5
144   #define PTE6 ((struct _hc08_bits *)(&PTE))->bit6
145   #define PTE7 ((struct _hc08_bits *)(&PTE))->bit7
146
147 VOLDATA UINT8 at 0x09 DDRE;    /* Data Direction Register E */
148   #define DDRE0 ((struct _hc08_bits *)(&DDRE))->bit0
149   #define DDRE1 ((struct _hc08_bits *)(&DDRE))->bit1
150   #define DDRE2 ((struct _hc08_bits *)(&DDRE))->bit2
151   #define DDRE3 ((struct _hc08_bits *)(&DDRE))->bit3
152   #define DDRE4 ((struct _hc08_bits *)(&DDRE))->bit4
153   #define DDRE5 ((struct _hc08_bits *)(&DDRE))->bit5
154   #define DDRE6 ((struct _hc08_bits *)(&DDRE))->bit6
155   #define DDRE7 ((struct _hc08_bits *)(&DDRE))->bit7
156
157 VOLDATA UINT8 at 0x0a TSC;     /* TIM Status and Control */
158   #define PS0   ((struct _hc08_bits *)(&TSC))->bit0
159   #define PS1   ((struct _hc08_bits *)(&TSC))->bit1
160   #define PS2   ((struct _hc08_bits *)(&TSC))->bit2
161   #define TRST  ((struct _hc08_bits *)(&TSC))->bit4
162   #define TSTOP ((struct _hc08_bits *)(&TSC))->bit5
163   #define TOIE  ((struct _hc08_bits *)(&TSC))->bit6
164   #define TOF   ((struct _hc08_bits *)(&TSC))->bit7
165
166 VOLDATA UINT16 at 0x0c TCNT;   /* TIM Counter High & Low Registers */
167 VOLDATA UINT8 at 0x0c TCNTH;   /* TIM Counter Register High */
168 VOLDATA UINT8 at 0x0d TCNTL;   /* TIM Counter Register Low */
169
170 VOLDATA UINT16 at 0x0e TMOD;   /* TIM Counter Modulo High & Low Registers */
171 VOLDATA UINT8 at 0x0e TMODH;   /* TIM Counter Modulo Register High */
172 VOLDATA UINT8 at 0x0f TMODL;   /* TIM Counter Modulo Register Low */
173
174 VOLDATA UINT8 at 0x10 TSC0;    /* TIM Channel 0 Status and Control Register */
175   #define CH0MAX ((struct _hc08_bits *)(&TSC0))->bit0
176   #define TOV0   ((struct _hc08_bits *)(&TSC0))->bit1
177   #define ELS0A  ((struct _hc08_bits *)(&TSC0))->bit2
178   #define ELS0B  ((struct _hc08_bits *)(&TSC0))->bit3
179   #define MS0A   ((struct _hc08_bits *)(&TSC0))->bit4
180   #define MS0B   ((struct _hc08_bits *)(&TSC0))->bit5
181   #define CH0IE  ((struct _hc08_bits *)(&TSC0))->bit6
182   #define CH0F   ((struct _hc08_bits *)(&TSC0))->bit7
183
184 VOLDATA UINT16 at 0x11 TCH0;   /* TIM Channel 0 High & Low Registers */
185 VOLDATA UINT8 at 0x11 TCH0H;   /* TIM Channel 0 Register High */
186 VOLDATA UINT8 at 0x12 TCH0L;   /* TIM Channel 0 Register Low */
187
188 VOLDATA UINT8 at 0x13 TSC1;    /* TIM Channel 1 Status and Control Register */
189   #define CH1MAX ((struct _hc08_bits *)(&TSC1))->bit0
190   #define TOV1   ((struct _hc08_bits *)(&TSC1))->bit1
191   #define ELS1A  ((struct _hc08_bits *)(&TSC1))->bit2
192   #define ELS1B  ((struct _hc08_bits *)(&TSC1))->bit3
193   #define MS1A   ((struct _hc08_bits *)(&TSC1))->bit4
194   #define CH1IE  ((struct _hc08_bits *)(&TSC1))->bit6
195   #define CH1F   ((struct _hc08_bits *)(&TSC1))->bit7
196
197 VOLDATA UINT16 at 0x14 TCH1;   /* TIM Channel 1 High & Low Registers */
198 VOLDATA UINT8 at 0x14 TCH1H;   /* TIM Channel 1 Register High */
199 VOLDATA UINT8 at 0x15 TCH1L;   /* TIM Channel 1 Register Low */
200
201 VOLDATA UINT8 at 0x16 KBSCR;   /* Keyboard Status and Control Register */
202   #define MODEK  ((struct _hc08_bits *)(&KBSCR))->bit0
203   #define IMASKK ((struct _hc08_bits *)(&KBSCR))->bit1
204   #define ACKK   ((struct _hc08_bits *)(&KBSCR))->bit2
205   #define KEYF   ((struct _hc08_bits *)(&KBSCR))->bit3
206
207 VOLDATA UINT8 at 0x17 KBIER;   /* Keyboard Interrupt Enable Register */
208   #define KBIE0 ((struct _hc08_bits *)(&KBIER))->bit0
209   #define KBIE1 ((struct _hc08_bits *)(&KBIER))->bit1
210   #define KBIE2 ((struct _hc08_bits *)(&KBIER))->bit2
211   #define KBIE3 ((struct _hc08_bits *)(&KBIER))->bit3
212   #define KBIE4 ((struct _hc08_bits *)(&KBIER))->bit4
213   #define KBIE5 ((struct _hc08_bits *)(&KBIER))->bit5
214   #define KBIE6 ((struct _hc08_bits *)(&KBIER))->bit6
215   #define KBIE7 ((struct _hc08_bits *)(&KBIER))->bit7
216
217 VOLDATA UINT8 at 0x18 UIR2;   /* USB Interrupt Register 2 */
218   #define RXD0FR  ((struct _hc08_bits *)(&UIR2))->bit0
219   #define TXD0FR  ((struct _hc08_bits *)(&UIR2))->bit1
220   #define RESUMFR ((struct _hc08_bits *)(&UIR2))->bit2
221   #define TXD1FR  ((struct _hc08_bits *)(&UIR2))->bit3
222   #define RXD2FR  ((struct _hc08_bits *)(&UIR2))->bit4
223   #define TXD2FR  ((struct _hc08_bits *)(&UIR2))->bit5
224   #define RSTFR   ((struct _hc08_bits *)(&UIR2))->bit6
225   #define EOPFR   ((struct _hc08_bits *)(&UIR2))->bit7
226
227 VOLDATA UINT8 at 0x19 UCR2;   /* USB Control Register 2 */
228   #define TP2SIZ0 ((struct _hc08_bits *)(&UCR2))->bit0
229   #define TP2SIZ1 ((struct _hc08_bits *)(&UCR2))->bit1
230   #define TP2SIZ2 ((struct _hc08_bits *)(&UCR2))->bit2
231   #define TP2SIZ3 ((struct _hc08_bits *)(&UCR2))->bit3
232   #define RX2E    ((struct _hc08_bits *)(&UCR2))->bit4
233   #define TX2E    ((struct _hc08_bits *)(&UCR2))->bit5
234   #define STALL2  ((struct _hc08_bits *)(&UCR2))->bit6
235   #define T2SEQ   ((struct _hc08_bits *)(&UCR2))->bit7
236
237 VOLDATA UINT8 at 0x1a UCR3;   /* USB Control Register 3 */
238   #define ENABLE1 ((struct _hc08_bits *)(&UCR3))->bit0
239   #define ENABLE2 ((struct _hc08_bits *)(&UCR3))->bit1
240   #define PULLEN  ((struct _hc08_bits *)(&UCR3))->bit2
241   #define ISTALL0 ((struct _hc08_bits *)(&UCR3))->bit4
242   #define OSTALL0 ((struct _hc08_bits *)(&UCR3))->bit5
243   #define TX1STR  ((struct _hc08_bits *)(&UCR3))->bit6
244   #define TX1ST   ((struct _hc08_bits *)(&UCR3))->bit7
245
246 VOLDATA UINT8 at 0x1b UCR4;   /* USB Control Register 4 */
247   #define FDM   ((struct _hc08_bits *)(&UCR4))->bit0
248   #define FDP   ((struct _hc08_bits *)(&UCR4))->bit1
249   #define FUSB0 ((struct _hc08_bits *)(&UCR4))->bit2
250
251 VOLDATA UINT8 at 0x1c IOCR;   /* IRQ Option Control Register */
252   #define IRQPD  ((struct _hc08_bits *)(&IOCR))->bit0
253   #define PTE4IE ((struct _hc08_bits *)(&IOCR))->bit1
254   #define PTE4IF ((struct _hc08_bits *)(&IOCR))->bit2
255
256 VOLDATA UINT8 at 0x1d POCR;   /* Port Option Control Register */
257  #define PAP     ((struct _hc08_bits *)(&POCR))->bit0
258  #define PBP     ((struct _hc08_bits *)(&POCR))->bit1
259  #define PCP     ((struct _hc08_bits *)(&POCR))->bit2
260  #define PTE3P   ((struct _hc08_bits *)(&POCR))->bit3
261  #define PTE4P   ((struct _hc08_bits *)(&POCR))->bit4
262  #define PTDILDD ((struct _hc08_bits *)(&POCR))->bit5
263  #define PTDLDD  ((struct _hc08_bits *)(&POCR))->bit6
264  #define PTE20P  ((struct _hc08_bits *)(&POCR))->bit7
265
266 VOLDATA UINT8 at 0x1e ISCR;   /* IRQ Status and Control Register */
267   #define MODE  ((struct _hc08_bits *)(&ISCR))->bit0
268   #define IMASK ((struct _hc08_bits *)(&ISCR))->bit1
269   #define ACK   ((struct _hc08_bits *)(&ISCR))->bit2
270   #define IRQF  ((struct _hc08_bits *)(&ISCR))->bit3
271
272 VOLDATA UINT8 at 0x1f CONFIG; /* Configuration Register 1 */
273 /* CONFIG1 is one-time writeable, so can't use bitfields */
274
275 VOLDATA UINT8 at 0x20 UE0D0;  /* USB Endpoint 0 Data Register 0 */
276 VOLDATA UINT8 at 0x21 UE0D1;  /* USB Endpoint 0 Data Register 1 */
277 VOLDATA UINT8 at 0x22 UE0D2;  /* USB Endpoint 0 Data Register 2 */
278 VOLDATA UINT8 at 0x23 UE0D3;  /* USB Endpoint 0 Data Register 3 */
279 VOLDATA UINT8 at 0x24 UE0D4;  /* USB Endpoint 0 Data Register 4 */
280 VOLDATA UINT8 at 0x25 UE0D5;  /* USB Endpoint 0 Data Register 5 */
281 VOLDATA UINT8 at 0x26 UE0D6;  /* USB Endpoint 0 Data Register 6 */
282 VOLDATA UINT8 at 0x27 UE0D7;  /* USB Endpoint 0 Data Register 7 */
283
284 VOLDATA UINT8 at 0x28 UE1D0;  /* USB Endpoint 1 Data Register 0 */
285 VOLDATA UINT8 at 0x29 UE1D1;  /* USB Endpoint 1 Data Register 1 */
286 VOLDATA UINT8 at 0x2a UE1D2;  /* USB Endpoint 1 Data Register 2 */
287 VOLDATA UINT8 at 0x2b UE1D3;  /* USB Endpoint 1 Data Register 3 */
288 VOLDATA UINT8 at 0x2c UE1D4;  /* USB Endpoint 1 Data Register 4 */
289 VOLDATA UINT8 at 0x2d UE1D5;  /* USB Endpoint 1 Data Register 5 */
290 VOLDATA UINT8 at 0x2e UE1D6;  /* USB Endpoint 1 Data Register 6 */
291 VOLDATA UINT8 at 0x2f UE1D7;  /* USB Endpoint 1 Data Register 7 */
292
293 VOLDATA UINT8 at 0x30 UE2D0;  /* USB Endpoint 2 Data Register 0 */
294 VOLDATA UINT8 at 0x31 UE2D1;  /* USB Endpoint 2 Data Register 1 */
295 VOLDATA UINT8 at 0x32 UE2D2;  /* USB Endpoint 2 Data Register 2 */
296 VOLDATA UINT8 at 0x33 UE2D3;  /* USB Endpoint 2 Data Register 3 */
297 VOLDATA UINT8 at 0x34 UE2D4;  /* USB Endpoint 2 Data Register 4 */
298 VOLDATA UINT8 at 0x35 UE2D5;  /* USB Endpoint 2 Data Register 5 */
299 VOLDATA UINT8 at 0x36 UE2D6;  /* USB Endpoint 2 Data Register 6 */
300 VOLDATA UINT8 at 0x37 UE2D7;  /* USB Endpoint 2 Data Register 7 */
301
302 VOLDATA UINT8 at 0x38 UADDR;  /* USB Address Register */
303  #define USBEN ((struct _hc08_bits *)(&UADDR))->bit7
304
305 VOLDATA UINT8 at 0x39 UIR0;   /* USB Interrupt Register 0 */
306   #define RXD0IE  ((struct _hc08_bits *)(&UIR0))->bit0
307   #define TXD0IE  ((struct _hc08_bits *)(&UIR0))->bit1
308   #define TXD1IE  ((struct _hc08_bits *)(&UIR0))->bit3
309   #define RXD2IE  ((struct _hc08_bits *)(&UIR0))->bit4
310   #define TXD2IE  ((struct _hc08_bits *)(&UIR0))->bit5
311   #define SUSPND  ((struct _hc08_bits *)(&UIR0))->bit6
312   #define EOPIE   ((struct _hc08_bits *)(&UIR0))->bit7
313
314 VOLDATA UINT8 at 0x3a UIR1;   /* USB Interrupt Register 1 */
315   #define RXD0F   ((struct _hc08_bits *)(&UIR1))->bit0
316   #define TXD0F   ((struct _hc08_bits *)(&UIR1))->bit1
317   #define RESUMF  ((struct _hc08_bits *)(&UIR1))->bit2
318   #define TXD1F   ((struct _hc08_bits *)(&UIR1))->bit3
319   #define RXD2F   ((struct _hc08_bits *)(&UIR1))->bit4
320   #define TXD2F   ((struct _hc08_bits *)(&UIR1))->bit5
321   #define RSTF    ((struct _hc08_bits *)(&UIR1))->bit6
322   #define EOPF    ((struct _hc08_bits *)(&UIR1))->bit7
323
324 VOLDATA UINT8 at 0x3b UCR0;   /* USB Control Register 0 */
325   #define TP0SIZ0 ((struct _hc08_bits *)(&UCR0))->bit0
326   #define TP0SIZ1 ((struct _hc08_bits *)(&UCR0))->bit1
327   #define TP0SIZ2 ((struct _hc08_bits *)(&UCR0))->bit2
328   #define TP0SIZ3 ((struct _hc08_bits *)(&UCR0))->bit3
329   #define RX0E    ((struct _hc08_bits *)(&UCR0))->bit4
330   #define TX0E    ((struct _hc08_bits *)(&UCR0))->bit5
331   #define T0SEQ   ((struct _hc08_bits *)(&UCR0))->bit7
332
333 VOLDATA UINT8 at 0x3c UCR1;   /* USB Control Register 1 */
334   #define TP1SIZ0 ((struct _hc08_bits *)(&UCR1))->bit0
335   #define TP1SIZ1 ((struct _hc08_bits *)(&UCR1))->bit1
336   #define TP1SIZ2 ((struct _hc08_bits *)(&UCR1))->bit2
337   #define TP1SIZ3 ((struct _hc08_bits *)(&UCR1))->bit3
338   #define FRESUM  ((struct _hc08_bits *)(&UCR1))->bit4
339   #define TX1E    ((struct _hc08_bits *)(&UCR1))->bit5
340   #define STALL1  ((struct _hc08_bits *)(&UCR1))->bit6
341   #define T1SEQ   ((struct _hc08_bits *)(&UCR1))->bit7
342
343 VOLDATA UINT8 at 0x3d USR0;   /* USB Status Register 0 */
344   #define RP0SIZ0 ((struct _hc08_bits *)(&USR0))->bit0
345   #define RP0SIZ1 ((struct _hc08_bits *)(&USR0))->bit1
346   #define RP0SIZ2 ((struct _hc08_bits *)(&USR0))->bit2
347   #define RP0SIZ3 ((struct _hc08_bits *)(&USR0))->bit3
348   #define SETUP   ((struct _hc08_bits *)(&USR0))->bit6
349   #define R0SEQ   ((struct _hc08_bits *)(&USR0))->bit7
350
351 VOLDATA UINT8 at 0x3e USR1;   /* USB Status Register 1 */
352   #define RP2SIZ0 ((struct _hc08_bits *)(&USR1))->bit0
353   #define RP2SIZ1 ((struct _hc08_bits *)(&USR1))->bit1
354   #define RP2SIZ2 ((struct _hc08_bits *)(&USR1))->bit2
355   #define RP2SIZ3 ((struct _hc08_bits *)(&USR1))->bit3
356   #define TXSTL   ((struct _hc08_bits *)(&USR1))->bit4
357   #define TXNAK   ((struct _hc08_bits *)(&USR1))->bit5
358   #define TXACK   ((struct _hc08_bits *)(&USR1))->bit6
359   #define R2SEQ   ((struct _hc08_bits *)(&USR1))->bit7
360
361 VOLXDATA UINT8 at 0xfe00 BSR;     /* Break Status Register */
362   #define SBSW ((struct _hc08_bits *)(&BSR))->bit1
363
364 VOLXDATA UINT8 at 0xfe01 RSR;    /* Reset Status Register */
365   #define LVI  ((struct _hc08_bits *)(&RSR))->bit1
366   #define USB  ((struct _hc08_bits *)(&RSR))->bit2
367   #define ILAD ((struct _hc08_bits *)(&RSR))->bit3
368   #define ILOP ((struct _hc08_bits *)(&RSR))->bit4
369   #define COP  ((struct _hc08_bits *)(&RSR))->bit5
370   #define PIN  ((struct _hc08_bits *)(&RSR))->bit6
371   #define POR  ((struct _hc08_bits *)(&RSR))->bit7
372
373 VOLXDATA UINT8 at 0xfe03 BFCR;    /* Break Flag Control Register */
374   #define BFCE ((struct _hc08_bits *)(&BFCR))->bit7
375
376 VOLXDATA UINT8 at 0xfe04 INT1;    /* Interrupt Status Register 1 */
377   #define IF1 ((struct _hc08_bits *)(&INT1))->bit2
378   #define IF2 ((struct _hc08_bits *)(&INT1))->bit3
379   #define IF3 ((struct _hc08_bits *)(&INT1))->bit4
380   #define IF4 ((struct _hc08_bits *)(&INT1))->bit5
381   #define IF5 ((struct _hc08_bits *)(&INT1))->bit6
382   #define IF6 ((struct _hc08_bits *)(&INT1))->bit7
383
384 VOLXDATA UINT8 at 0xfe08 FLCR;    /* FLASH Control Register */
385   #define PGM   ((struct _hc08_bits *)(&FLCR))->bit0
386   #define ERASE ((struct _hc08_bits *)(&FLCR))->bit1
387   #define MASS  ((struct _hc08_bits *)(&FLCR))->bit2
388   #define HVEN  ((struct _hc08_bits *)(&FLCR))->bit3
389
390 VOLXDATA UINT8 at 0xfe09 FLBPR;    /* FLASH Block Protect Register */
391   #define BPR0 ((struct _hc08_bits *)(&FLBPR))->bit0
392   #define BPR1 ((struct _hc08_bits *)(&FLBPR))->bit1
393   #define BPR2 ((struct _hc08_bits *)(&FLBPR))->bit2
394   #define BPR3 ((struct _hc08_bits *)(&FLBPR))->bit3
395   #define BPR4 ((struct _hc08_bits *)(&FLBPR))->bit4
396   #define BPR5 ((struct _hc08_bits *)(&FLBPR))->bit5
397   #define BPR6 ((struct _hc08_bits *)(&FLBPR))->bit6
398   #define BPR7 ((struct _hc08_bits *)(&FLBPR))->bit7
399
400 VOLXDATA UINT16 at 0xfe0c BRK;    /* Break Address High & Low Registers */
401 VOLXDATA UINT8 at 0xfe0c BRKH;    /* Break Address High Register */
402 VOLXDATA UINT8 at 0xfe0d BRKL;    /* Break Address Low Register */
403
404 VOLXDATA UINT8 at 0xfe0e BRKSCR;  /* Break Status and Control Register */
405   #define BRKA ((struct _hc08_bits *)(&BRKSCR))->bit6
406   #define BRKE ((struct _hc08_bits *)(&BRKSCR))->bit7
407
408 VOLXDATA UINT8 at 0xffff COPCTL;  /* COP Control Register */
409
410 #endif
411