-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathio_reg.h
256 lines (255 loc) · 11.3 KB
/
io_reg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
#include "base.h"
struct io_reg {
unsigned volatile short DISPCNT;
unsigned volatile short _reserved0[1];
unsigned volatile short DISPSTAT;
unsigned volatile short VCOUNT;
unsigned volatile short BG0CNT;
unsigned volatile short BG1CNT;
unsigned volatile short BG2CNT;
unsigned volatile short BG3CNT;
unsigned volatile short BG0HOFS;
unsigned volatile short BG0VOFS;
unsigned volatile short BG1HOFS;
unsigned volatile short BG1VOFS;
unsigned volatile short BG2HOFS;
unsigned volatile short BG2VOFS;
unsigned volatile short BG3HOFS;
unsigned volatile short BG3VOFS;
unsigned volatile short BG2PA;
unsigned volatile short BG2PB;
unsigned volatile short BG2PC;
unsigned volatile short BG2PD;
unsigned volatile short BG2X_L;
unsigned volatile short BG2X_H;
unsigned volatile short BG2Y_L;
unsigned volatile short BG2Y_H;
unsigned volatile short BG3PA;
unsigned volatile short BG3PB;
unsigned volatile short BG3PC;
unsigned volatile short BG3PD;
unsigned volatile short BG3X_L;
unsigned volatile short BG3X_H;
unsigned volatile short BG3Y_L;
unsigned volatile short BG3Y_H;
unsigned volatile short WIN0H;
unsigned volatile short WIN1H;
unsigned volatile short WIN0V;
unsigned volatile short WIN1V;
unsigned volatile short WININ;
unsigned volatile short WINOUT;
unsigned volatile short MOSAIC;
unsigned volatile short _reserved1[1];
unsigned volatile short BLDCNT;
unsigned volatile short BLD_ALPHA;
unsigned volatile short BLDY;
unsigned volatile short _reserved2[5];
unsigned volatile short SOUND1_CNT_L;
unsigned volatile short SOUND1_CNT_H;
unsigned volatile short SOUND1_CNT_X;
unsigned volatile short _reserved3[1];
unsigned volatile short SOUND2_CNT_L;
unsigned volatile short _reserved4[1];
unsigned volatile short SOUND2_CNT_H;
unsigned volatile short _reserved5[1];
unsigned volatile short SOUND3_CNT_L;
unsigned volatile short SOUND3_CNT_H;
unsigned volatile short SOUND3_CNT_X;
unsigned volatile short _reserved6[1];
unsigned volatile short SOUND4_CNT_L;
unsigned volatile short _reserved7[1];
unsigned volatile short SOUND4_CNT_H;
unsigned volatile short _reserved8[1];
unsigned volatile short SOUNDCNT_L;
unsigned volatile short SOUNDCNT_H;
unsigned volatile short SOUNDCNT_X;
unsigned volatile short _reserved9[1];
unsigned volatile short SOUNDBIAS;
unsigned volatile short _reserved10[3];
unsigned volatile short WAVE_RAM0_L;
unsigned volatile short WAVE_RAM0_H;
unsigned volatile short WAVE_RAM1_L;
unsigned volatile short WAVE_RAM1_H;
unsigned volatile short WAVE_RAM2_L;
unsigned volatile short WAVE_RAM2_H;
unsigned volatile short WAVE_RAM3_L;
unsigned volatile short WAVE_RAM3_H;
unsigned volatile short FIFO_A_L;
unsigned volatile short FIFO_A_H;
unsigned volatile short FIFO_B_L;
unsigned volatile short FIFO_B_H;
unsigned volatile short _reserved11[4];
unsigned volatile short DMA0_SAD_L;
unsigned volatile short DMA0_SAD_H;
unsigned volatile short DMA0_DAD_L;
unsigned volatile short DMA0_DAD_H;
unsigned volatile short DMA0_CNT_L;
unsigned volatile short DMA0_CNT_H;
unsigned volatile short DMA1_SAD_L;
unsigned volatile short DMA1_SAD_H;
unsigned volatile short DMA1_DAD_L;
unsigned volatile short DMA1_DAD_H;
unsigned volatile short DMA1_CNT_L;
unsigned volatile short DMA1_CNT_H;
unsigned volatile short DMA2_SAD_L;
unsigned volatile short DMA2_SAD_H;
unsigned volatile short DMA2_DAD_L;
unsigned volatile short DMA2_DAD_H;
unsigned volatile short DMA2_CNT_L;
unsigned volatile short DMA2_CNT_H;
unsigned volatile short DMA3_SAD_L;
unsigned volatile short DMA3_SAD_H;
unsigned volatile short DMA3_DAD_L;
unsigned volatile short DMA3_DAD_H;
unsigned volatile short DMA3_CNT_L;
unsigned volatile short DMA3_CNT_H;
unsigned volatile short _reserved12[16];
unsigned volatile short TM0CNT_L;
unsigned volatile short TM0CNT_H;
unsigned volatile short TM1CNT_L;
unsigned volatile short TM1CNT_H;
unsigned volatile short TM2CNT_L;
unsigned volatile short TM2CNT_H;
unsigned volatile short TM3CNT_L;
unsigned volatile short TM3CNT_H;
unsigned volatile short _reserved13[8];
unsigned volatile short SIO_MULTI0;
unsigned volatile short SIO_MULTI1;
unsigned volatile short SIO_MULTI2;
unsigned volatile short SIO_MULTI3;
unsigned volatile short SIOCNT;
union {
unsigned volatile short SIODATA8;
unsigned volatile short SIOMLT_SEND;
};
unsigned volatile short _reserved14[2];
unsigned volatile short KEY_INPUT;
unsigned volatile short KEYCNT;
unsigned volatile short RCNT;
unsigned volatile short _reserved15[101];
unsigned volatile short IE;
unsigned volatile short IF;
unsigned volatile short WAITCNT;
unsigned volatile short _reserved16[1];
unsigned volatile short IME;
unsigned volatile short _reserved17[123];
unsigned volatile char _reserved18;
unsigned volatile char HALTCNT;
};
extern struct io_reg io_reg;
#define offsetof __builtin_offsetof
#define static_assert _Static_assert
static_assert(offsetof(struct io_reg, DISPCNT) == 0);
static_assert(offsetof(struct io_reg, DISPSTAT) == 4);
static_assert(offsetof(struct io_reg, VCOUNT) == 6);
static_assert(offsetof(struct io_reg, BG0CNT) == 8);
static_assert(offsetof(struct io_reg, BG1CNT) == 10);
static_assert(offsetof(struct io_reg, BG2CNT) == 12);
static_assert(offsetof(struct io_reg, BG3CNT) == 14);
static_assert(offsetof(struct io_reg, BG0HOFS) == 16);
static_assert(offsetof(struct io_reg, BG0VOFS) == 18);
static_assert(offsetof(struct io_reg, BG1HOFS) == 20);
static_assert(offsetof(struct io_reg, BG1VOFS) == 22);
static_assert(offsetof(struct io_reg, BG2HOFS) == 24);
static_assert(offsetof(struct io_reg, BG2VOFS) == 26);
static_assert(offsetof(struct io_reg, BG3HOFS) == 28);
static_assert(offsetof(struct io_reg, BG3VOFS) == 30);
static_assert(offsetof(struct io_reg, BG2PA) == 32);
static_assert(offsetof(struct io_reg, BG2PB) == 34);
static_assert(offsetof(struct io_reg, BG2PC) == 36);
static_assert(offsetof(struct io_reg, BG2PD) == 38);
static_assert(offsetof(struct io_reg, BG2X_L) == 40);
static_assert(offsetof(struct io_reg, BG2X_H) == 42);
static_assert(offsetof(struct io_reg, BG2Y_L) == 44);
static_assert(offsetof(struct io_reg, BG2Y_H) == 46);
static_assert(offsetof(struct io_reg, BG3PA) == 48);
static_assert(offsetof(struct io_reg, BG3PB) == 50);
static_assert(offsetof(struct io_reg, BG3PC) == 52);
static_assert(offsetof(struct io_reg, BG3PD) == 54);
static_assert(offsetof(struct io_reg, BG3X_L) == 56);
static_assert(offsetof(struct io_reg, BG3X_H) == 58);
static_assert(offsetof(struct io_reg, BG3Y_L) == 60);
static_assert(offsetof(struct io_reg, BG3Y_H) == 62);
static_assert(offsetof(struct io_reg, WIN0H) == 64);
static_assert(offsetof(struct io_reg, WIN1H) == 66);
static_assert(offsetof(struct io_reg, WIN0V) == 68);
static_assert(offsetof(struct io_reg, WIN1V) == 70);
static_assert(offsetof(struct io_reg, WININ) == 72);
static_assert(offsetof(struct io_reg, WINOUT) == 74);
static_assert(offsetof(struct io_reg, MOSAIC) == 76);
static_assert(offsetof(struct io_reg, BLDCNT) == 80);
static_assert(offsetof(struct io_reg, BLD_ALPHA) == 82);
static_assert(offsetof(struct io_reg, BLDY) == 84);
static_assert(offsetof(struct io_reg, SOUND1_CNT_L) == 96);
static_assert(offsetof(struct io_reg, SOUND1_CNT_H) == 98);
static_assert(offsetof(struct io_reg, SOUND1_CNT_X) == 100);
static_assert(offsetof(struct io_reg, SOUND2_CNT_L) == 104);
static_assert(offsetof(struct io_reg, SOUND2_CNT_H) == 108);
static_assert(offsetof(struct io_reg, SOUND3_CNT_L) == 112);
static_assert(offsetof(struct io_reg, SOUND3_CNT_H) == 114);
static_assert(offsetof(struct io_reg, SOUND3_CNT_X) == 116);
static_assert(offsetof(struct io_reg, SOUND4_CNT_L) == 120);
static_assert(offsetof(struct io_reg, SOUND4_CNT_H) == 124);
static_assert(offsetof(struct io_reg, SOUNDCNT_L) == 128);
static_assert(offsetof(struct io_reg, SOUNDCNT_H) == 130);
static_assert(offsetof(struct io_reg, SOUNDCNT_X) == 132);
static_assert(offsetof(struct io_reg, SOUNDBIAS) == 136);
static_assert(offsetof(struct io_reg, WAVE_RAM0_L) == 144);
static_assert(offsetof(struct io_reg, WAVE_RAM0_H) == 146);
static_assert(offsetof(struct io_reg, WAVE_RAM1_L) == 148);
static_assert(offsetof(struct io_reg, WAVE_RAM1_H) == 150);
static_assert(offsetof(struct io_reg, WAVE_RAM2_L) == 152);
static_assert(offsetof(struct io_reg, WAVE_RAM2_H) == 154);
static_assert(offsetof(struct io_reg, WAVE_RAM3_L) == 156);
static_assert(offsetof(struct io_reg, WAVE_RAM3_H) == 158);
static_assert(offsetof(struct io_reg, FIFO_A_L) == 160);
static_assert(offsetof(struct io_reg, FIFO_A_H) == 162);
static_assert(offsetof(struct io_reg, FIFO_B_L) == 164);
static_assert(offsetof(struct io_reg, FIFO_B_H) == 166);
static_assert(offsetof(struct io_reg, DMA0_SAD_L) == 176);
static_assert(offsetof(struct io_reg, DMA0_SAD_H) == 178);
static_assert(offsetof(struct io_reg, DMA0_DAD_L) == 180);
static_assert(offsetof(struct io_reg, DMA0_DAD_H) == 182);
static_assert(offsetof(struct io_reg, DMA0_CNT_L) == 184);
static_assert(offsetof(struct io_reg, DMA0_CNT_H) == 186);
static_assert(offsetof(struct io_reg, DMA1_SAD_L) == 188);
static_assert(offsetof(struct io_reg, DMA1_SAD_H) == 190);
static_assert(offsetof(struct io_reg, DMA1_DAD_L) == 192);
static_assert(offsetof(struct io_reg, DMA1_DAD_H) == 194);
static_assert(offsetof(struct io_reg, DMA1_CNT_L) == 196);
static_assert(offsetof(struct io_reg, DMA1_CNT_H) == 198);
static_assert(offsetof(struct io_reg, DMA2_SAD_L) == 200);
static_assert(offsetof(struct io_reg, DMA2_SAD_H) == 202);
static_assert(offsetof(struct io_reg, DMA2_DAD_L) == 204);
static_assert(offsetof(struct io_reg, DMA2_DAD_H) == 206);
static_assert(offsetof(struct io_reg, DMA2_CNT_L) == 208);
static_assert(offsetof(struct io_reg, DMA2_CNT_H) == 210);
static_assert(offsetof(struct io_reg, DMA3_SAD_L) == 212);
static_assert(offsetof(struct io_reg, DMA3_SAD_H) == 214);
static_assert(offsetof(struct io_reg, DMA3_DAD_L) == 216);
static_assert(offsetof(struct io_reg, DMA3_DAD_H) == 218);
static_assert(offsetof(struct io_reg, DMA3_CNT_L) == 220);
static_assert(offsetof(struct io_reg, DMA3_CNT_H) == 222);
static_assert(offsetof(struct io_reg, TM0CNT_L) == 256);
static_assert(offsetof(struct io_reg, TM0CNT_H) == 258);
static_assert(offsetof(struct io_reg, TM1CNT_L) == 260);
static_assert(offsetof(struct io_reg, TM1CNT_H) == 262);
static_assert(offsetof(struct io_reg, TM2CNT_L) == 264);
static_assert(offsetof(struct io_reg, TM2CNT_H) == 266);
static_assert(offsetof(struct io_reg, TM3CNT_L) == 268);
static_assert(offsetof(struct io_reg, TM3CNT_H) == 270);
static_assert(offsetof(struct io_reg, SIO_MULTI0) == 288);
static_assert(offsetof(struct io_reg, SIO_MULTI1) == 290);
static_assert(offsetof(struct io_reg, SIO_MULTI2) == 292);
static_assert(offsetof(struct io_reg, SIO_MULTI3) == 294);
static_assert(offsetof(struct io_reg, SIOCNT) == 296);
static_assert(offsetof(struct io_reg, SIODATA8) == 298);
static_assert(offsetof(struct io_reg, SIOMLT_SEND) == 298);
static_assert(offsetof(struct io_reg, KEY_INPUT) == 304);
static_assert(offsetof(struct io_reg, KEYCNT) == 306);
static_assert(offsetof(struct io_reg, RCNT) == 308);
static_assert(offsetof(struct io_reg, IE) == 512);
static_assert(offsetof(struct io_reg, IF) == 514);
static_assert(offsetof(struct io_reg, WAITCNT) == 516);
static_assert(offsetof(struct io_reg, IME) == 520);
static_assert(offsetof(struct io_reg, HALTCNT) == 769);