Added a test for MUIA_Listview_SelectChange.
[AROS.git] / compiler / include / libraries / configregs.h
blob6a8d00ddda9db66cdbbff452524ff4e035b4d142
1 #ifndef LIBRARIES_CONFIGREGS_H
2 #define LIBRARIES_CONFIGREGS_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: AutoConfig(tm) hardware register definitions
9 Lang: english
12 #ifndef EXEC_TYPES_H
13 #include <exec/types.h>
14 #endif
16 struct ExpansionRom
18 UBYTE er_Type;
19 UBYTE er_Product;
20 UBYTE er_Flags;
21 UBYTE er_Reserved03;
22 UWORD er_Manufacturer;
23 ULONG er_SerialNumber;
24 UWORD er_InitDiagVec;
25 union {
26 struct {
27 UBYTE c;
28 UBYTE d;
29 UBYTE e;
30 UBYTE f;
31 } Reserved0;
32 struct DiagArea *DiagArea;
33 } er_;
36 /* This allows for simpler definition when assigning a DiagArea pointer. */
37 #define er_Reserved0c er_.Reserved0.c
38 #define er_Reserved0d er_.Reserved0.d
39 #define er_Reserved0e er_.Reserved0.e
40 #define er_Reserved0f er_.Reserved0.f
41 #define er_DiagArea er_.DiagArea
43 struct ExpansionControl
45 UBYTE ec_Interrupt;
46 UBYTE ec_Z3_HighBase;
47 UBYTE ec_BaseAddress;
48 UBYTE ec_Shutup;
49 UBYTE ec_Reserved14;
50 UBYTE ec_Reserved15;
51 UBYTE ec_Reserved16;
52 UBYTE ec_Reserved17;
53 UBYTE ec_Reserved18;
54 UBYTE ec_Reserved19;
55 UBYTE ec_Reserved1a;
56 UBYTE ec_Reserved1b;
57 UBYTE ec_Reserved1c;
58 UBYTE ec_Reserved1d;
59 UBYTE ec_Reserved1e;
60 UBYTE ec_Reserved1f;
63 #define E_SLOTSIZE 0x10000
64 #define E_SLOTMASK 0xFFFF
65 #define E_SLOTSHIFT 16
67 #define E_EXPANSIONBASE 0x00e80000
68 #define E_EXPANSIONSIZE 0x00080000
69 #define E_EXPANSIONSLOTS 8
71 #define E_MEMORYBASE 0x00200000
72 #define E_MEMORYSIZE 0x00800000
73 #define E_MEMORYSLOTS 128
75 #define EZ3_EXPANSIONBASE 0xFF000000
76 #define EZ3_CONFIGAREA 0x40000000
77 #define EZ3_CONFIGAREAEND 0x7FFFFFFF
78 #define EZ3_SIZEGRANULARITY 0x00080000
80 /* er_Type */
81 #define ERT_TYPEMASK 0xc0
82 #define ERT_TYPEBIT 6
83 #define ERT_TYPESIZE 2
84 #define ERT_NEWBOARD 0xc0
85 #define ERT_ZORROII ERT_NEWBOARD
86 #define ERT_ZORROIII 0x80
88 #define ERTB_MEMLIST 5
89 #define ERTF_MEMLIST (1L<<5)
90 #define ERTB_DIAGVALID 4
91 #define ERTF_DIAGVALID (1L<<4)
92 #define ERTB_CHAINEDCONFIG 3
93 #define ERTF_CHAINEDCONFIG (1L<<3)
95 #define ERT_MEMMASK 0x7
96 #define ERT_MEMBIT 0
97 #define ERT_MEMSIZE 3
99 /* er_Flags */
100 #define ERFB_MEMSPACE 7
101 #define ERFF_MEMSPACE (1L<<7)
102 #define ERFB_NOSHUTUP 6
103 #define ERFF_NOSHUTUP (1L<<6)
104 #define ERFB_EXTENDED 5
105 #define ERFF_EXTENDED (1L<<5)
106 #define ERFB_ZORRO_III 4
107 #define ERFF_ZORRO_III (1L<<4)
109 #define ERT_Z3_SSMASK 0x0F
110 #define ERT_Z3_SSBIT 0
111 #define ERT_Z3_SSSIZE 4
113 /* ec_Interrupt register (unused) */
114 #define ECIB_INTENA 1
115 #define ECIF_INTENA (1L<<1)
116 #define ECIB_RESET 3
117 #define ECIF_RESET (1L<<3)
118 #define ECIB_INT2PEND 4
119 #define ECIF_INT2PEND (1L<<4)
120 #define ECIB_INT6PEND 5
121 #define ECIF_INT6PEND (1L<<5)
122 #define ECIB_INT7PEND 6
123 #define ECIF_INT7PEND (1L<<6)
124 #define ECIB_INTERRUPTING 7
125 #define ECIF_INTERRUPTING (1L<<7)
127 #define ERT_MEMNEEDED(t) \
128 (((t)&ERT_MEMMASK)? 0x10000 << (((t)&ERT_MEMMASK) -1) : 0x800000 )
130 #define ERT_SLOTSNEEDED(t) \
131 (((t)&ERT_MEMMASK)? 1 << (((t)&ERT_MEMMASK) -1) : 0x80 )
134 #define EC_MEMADDR(slot) ((slot) << (E_SLOTSHIFT))
135 #define EROFFSET(er) (int)&((struct ExpansionRom *)0)->er)
136 #define ECOFFSET(ec) \
137 ((sizeof(struct ExpansionRom)+((int)&((struct ExpansionControl *)0)->ec))
139 /* DiagArea */
141 struct DiagArea
143 UBYTE da_Config;
144 UBYTE da_Flags;
145 UWORD da_Size;
146 UWORD da_DiagPoint;
147 UWORD da_BootPoint;
148 UWORD da_Name;
149 UWORD da_Reserved01;
150 UWORD da_Reserved02;
153 #define DAC_BUSWIDTH 0xC0
154 #define DAC_NIBBLEWIDE 0x00
155 #define DAC_BYTEWIDE 0x40
156 #define DAC_WORDWIDE 0x80
158 #define DAC_BOOTTIME 0x30
159 #define DAC_NEVER 0x00
160 #define DAC_CONFIGTIME 0x10
161 #define DAC_BINDTIME 0x20
163 /* da_DiagPoint function definition should be as follows
165 AROS_UFH5(ULONG, diagPoint,
166 AROS_UFHA(APTR, boardBase, A0),
167 AROS_UFHA(APTR, diagCopy, A2),
168 AROS_UFHA(struct ConfigDev *, configDev, A3),
169 AROS_UFHA(struct ExpansionBase *, ExpansionBase, A5),
170 AROS_UFHA(struct ExecBase *, SysBase, A6)
176 As most of these will be in ROMs on the expansion board, this will
177 generally be coded in assembly language.
181 #endif /* LIBRARIES_CONFIGREGS_H */