source: anotherchoice/tags/jsp-1.4.4-full-UTF8/config/s1c33/s1c33.h@ 363

Last change on this file since 363 was 363, checked in by ykominami, 5 years ago

add tags/jsp-1.4.4-full-UTF8

  • Property svn:executable set to *
File size: 9.8 KB
Line 
1/*
2 * TOPPERS/JSP Kernel
3 * Toyohashi Open Platform for Embedded Real-Time Systems/
4 * Just Standard Profile Kernel
5 *
6 * Copyright (C) 2000 by Embedded and Real-Time Systems Laboratory
7 * Toyohashi Univ. of Technology, JAPAN
8 *
9 * Copyright (C) 2004 by SEIKO EPSON Corp, JAPAN
10 *
11 * 上記著作権者
12は,以下の (1)〜(4) の条件か,Free Software Foundation
13 * によってå…
14¬è¡¨ã•ã‚Œã¦ã„ã‚‹ GNU General Public License の Version 2 に記
15 * 述されている条件を満たす場合に限り,本ソフトウェア(本ソフトウェア
16 * を改変したものを含む.以下同じ)を使用・複製・改変・再é…
17å¸ƒï¼ˆä»¥ä¸‹ï¼Œ
18 * 利用と呼ぶ)することを無償で許諾する.
19 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
20 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
21 * スコード中に含まれていること.
22 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
23 * 用できる形で再é…
24å¸ƒã™ã‚‹å ´åˆã«ã¯ï¼Œå†é…
25å¸ƒã«ä¼´ã†ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆï¼ˆåˆ©ç”¨
26 * 者
27マニュアルなど)に,上記の著作権表示,この利用条件および下記
28 * の無保証規定を掲載すること.
29 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
30 * 用できない形で再é…
31å¸ƒã™ã‚‹å ´åˆã«ã¯ï¼Œæ¬¡ã®ã„ずれかの条件を満たすこ
32 * と.
33 * (a) 再é…
34å¸ƒã«ä¼´ã†ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆï¼ˆåˆ©ç”¨è€…
35マニュアルなど)に,上記の著
36 * 作権表示,この利用条件および下記の無保証規定を掲載すること.
37 * (b) 再é…
38å¸ƒã®å½¢æ…
39‹ã‚’,別に定める方法によって,TOPPERSプロジェクトに
40 * 報告すること.
41 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
42 * 害からも,上記著作権者
43およびTOPPERSプロジェクトをå…
44è²¬ã™ã‚‹ã“と.
45 *
46 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者
47お
48 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,その適用可能性も
49 * 含めて,いかなる保証も行わない.また,本ソフトウェアの利用により直
50 * 接的または間接的に生じたいかなる損害に関しても,その責任を負わない.
51 *
52 */
53
54/*
55 * ハードウェア資源の定義
56 */
57#ifndef _S1C33_H_
58#define _S1C33_H_
59
60/*
61 * 汎用レジスタ数
62 */
63#define S1C33_GR_NUM 16
64
65/*
66 * PSR
67 */
68#define S1C33_PSR_INITIAL 0x00000000
69#define S1C33_PSR_MASK_IL 0x00000F00
70#define S1C33_PSR_FLAG_IE 0x00000010
71
72/*
73 * 基本メモリマップ
74 */
75#define S1C33_AREA00_BASE 0x00000000
76#define S1C33_AREA01_BASE 0x00040000
77#define S1C33_AREA02_BASE 0x00060000
78#define S1C33_AREA03_BASE 0x00080000
79#define S1C33_AREA04_BASE 0x00100000
80#define S1C33_AREA05_BASE 0x00200000
81#define S1C33_AREA06_BASE 0x00300000
82#define S1C33_AREA07_BASE 0x00400000
83#define S1C33_AREA08_BASE 0x00600000
84#define S1C33_AREA09_BASE 0x00800000
85#define S1C33_AREA10_BASE 0x00c00000
86#define S1C33_AREA11_BASE 0x01000000
87#define S1C33_AREA12_BASE 0x01800000
88#define S1C33_AREA13_BASE 0x02000000
89#define S1C33_AREA14_BASE 0x03000000
90#define S1C33_AREA15_BASE 0x04000000
91#define S1C33_AREA16_BASE 0x06000000
92#define S1C33_AREA17_BASE 0x08000000
93#define S1C33_AREA18_BASE 0x0c000000
94
95#define S1C33_INTERNAL_RAM_BASE S1C33_AREA00_BASE
96#define S1C33_INT08_DEVICE_BASE (S1C33_AREA01_BASE + 0x0000000)
97#define S1C33_INT16_DEVICE_BASE (S1C33_AREA01_BASE + 0x0008000)
98#define S1C33_EXT08_DEVICE_BASE (S1C33_AREA06_BASE + 0x0000000)
99#define S1C33_EXT16_DEVICE_BASE (S1C33_AREA06_BASE + 0x0080000)
100
101#define S1C33_TIMER_CONTROL_BASE (S1C33_INT08_DEVICE_BASE + 0x0000140)
102#define S1C33_CLKTIMER_BASE (S1C33_INT08_DEVICE_BASE + 0x0000150)
103#define S1C33_P8TIMER_BASE (S1C33_INT08_DEVICE_BASE + 0x0000160)
104#define S1C33_WATCHDOG_BASE (S1C33_INT08_DEVICE_BASE + 0x0000170)
105#define S1C33_POWER_BASE (S1C33_INT08_DEVICE_BASE + 0x0000180)
106#define S1C33_SERIAL_BASE (S1C33_INT08_DEVICE_BASE + 0x00001e0)
107#define S1C33_AD_BASE (S1C33_INT08_DEVICE_BASE + 0x0000240)
108#define S1C33_INTC_BASE (S1C33_INT08_DEVICE_BASE + 0x0000260)
109#define S1C33_DMAC_BASE (S1C33_INT08_DEVICE_BASE + 0x0000290)
110#define S1C33_PORT_BASE (S1C33_INT08_DEVICE_BASE + 0x00002c0)
111
112#define S1C33_BCU_BASE (S1C33_INT16_DEVICE_BASE + 0x0000120)
113#define S1C33_P16TIMER_BASE (S1C33_INT16_DEVICE_BASE + 0x0000180)
114#define S1C33_IDMA_BASE (S1C33_INT16_DEVICE_BASE + 0x0000200)
115#define S1C33_HSDMA_BASE (S1C33_INT16_DEVICE_BASE + 0x0000220)
116
117/*
118 * 割り込みベクタ番号
119 */
120#define S1C33_INHNO_RESET 0x00
121#define S1C33_INHNO_ZERO 0x04
122#define S1C33_INHNO_ADDRESS 0x06
123#define S1C33_INHNO_DEBUG 0x07
124#define S1C33_INHNO_NMI 0x08
125#define S1C33_INHNO_INT0 0x0c
126#define S1C33_INHNO_INT1 0x0d
127#define S1C33_INHNO_INT2 0x0e
128#define S1C33_INHNO_INT3 0x0f
129#define S1C33_INHNO_PINT0 0x10
130#define S1C33_INHNO_PINT1 0x11
131#define S1C33_INHNO_PINT2 0x12
132#define S1C33_INHNO_PINT3 0x13
133#define S1C33_INHNO_KINT0 0x14
134#define S1C33_INHNO_KINT1 0x15
135#define S1C33_INHNO_HSDMA0 0x16
136#define S1C33_INHNO_HSDMA1 0x17
137#define S1C33_INHNO_HSDMA2 0x18
138#define S1C33_INHNO_HSDMA3 0x19
139#define S1C33_INHNO_IDMA 0x1a
140#define S1C33_INHNO_P16TIMER0B 0x1e
141#define S1C33_INHNO_P16TIMER0A 0x1f
142#define S1C33_INHNO_P16TIMER1B 0x22
143#define S1C33_INHNO_P16TIMER1A 0x23
144#define S1C33_INHNO_P16TIMER2B 0x26
145#define S1C33_INHNO_P16TIMER2A 0x27
146#define S1C33_INHNO_P16TIMER3B 0x2a
147#define S1C33_INHNO_P16TIMER3A 0x2b
148#define S1C33_INHNO_P16TIMER4B 0x2e
149#define S1C33_INHNO_P16TIMER4A 0x2f
150#define S1C33_INHNO_P16TIMER5B 0x32
151#define S1C33_INHNO_P16TIMER5A 0x33
152#define S1C33_INHNO_P8TIMER0 0x34
153#define S1C33_INHNO_P8TIMER1 0x35
154#define S1C33_INHNO_P8TIMER2 0x36
155#define S1C33_INHNO_P8TIMER3 0x37
156#define S1C33_INHNO_SERIAL0ERR 0x38
157#define S1C33_INHNO_SERIAL0RX 0x39
158#define S1C33_INHNO_SERIAL0TX 0x3a
159#define S1C33_INHNO_SERIAL1ERR 0x3c
160#define S1C33_INHNO_SERIAL1RX 0x3d
161#define S1C33_INHNO_SERIAL1TX 0x3e
162#define S1C33_INHNO_AD 0x40
163#define S1C33_INHNO_CLKTIMER 0x41
164#define S1C33_INHNO_PINT4 0x44
165#define S1C33_INHNO_PINT5 0x45
166#define S1C33_INHNO_PINT6 0x46
167#define S1C33_INHNO_PINT7 0x47
168#define S1C33_INHNO_P8TIMER4 0x48
169#define S1C33_INHNO_P8TIMER5 0x49
170#define S1C33_INHNO_SERIAL2ERR 0x4c
171#define S1C33_INHNO_SERIAL2RX 0x4d
172#define S1C33_INHNO_SERIAL2TX 0x4e
173#define S1C33_INHNO_SERIAL3ERR 0x50
174#define S1C33_INHNO_SERIAL3RX 0x51
175#define S1C33_INHNO_SERIAL3TX 0x52
176
177/*
178 * アドバンストマクロ固有の割り込みベクタ
179 */
180#define S1C33_INHNO_PINT8 0x54
181#define S1C33_INHNO_PINT9 0x55
182#define S1C33_INHNO_PINT10 0x56
183#define S1C33_INHNO_PINT11 0x57
184#define S1C33_INHNO_PINT12 0x58
185#define S1C33_INHNO_PINT13 0x59
186#define S1C33_INHNO_PINT14 0x5a
187#define S1C33_INHNO_PINT15 0x5b
188#define S1C33_INHNO_P16TIMER6B 0x5e
189#define S1C33_INHNO_P16TIMER6A 0x5f
190#define S1C33_INHNO_P16TIMER7B 0x62
191#define S1C33_INHNO_P16TIMER7A 0x63
192#define S1C33_INHNO_P16TIMER8B 0x66
193#define S1C33_INHNO_P16TIMER8A 0x67
194#define S1C33_INHNO_P16TIMER9B 0x6a
195#define S1C33_INHNO_P16TIMER9A 0x6b
196
197
198#ifndef _MACRO_ONLY
199
200typedef unsigned char byte;
201typedef unsigned short word;
202typedef volatile byte IOREG;
203typedef volatile word HIOREG;
204typedef volatile int LIOREG;
205
206/*
207 * レジスタ(TIMER_CONTROL 140)
208 */
209typedef struct {
210 IOREG bP8ClkSelect45;
211 IOREG bDummy[4];
212 IOREG bP8ClkCtrl45;
213 IOREG bP8ClkSelect;
214 IOREG bP16ClkCtrl[6];
215 IOREG bP8ClkCtrl[2];
216 IOREG bADClkCtrl;
217} s1c33TimerControl_t;
218
219/*
220 * レジスタ(SERIAL 1e0)
221 */
222typedef struct {
223 struct {
224 IOREG bTxd;
225 IOREG bRxd;
226 IOREG bStatus;
227 IOREG bControl;
228 IOREG bIrDA;
229 } stChannel01[2];
230
231 IOREG Dummy0[6];
232
233 struct {
234 IOREG bTxd;
235 IOREG bRxd;
236 IOREG bStatus;
237 IOREG bControl;
238 IOREG bIrDA;
239 } stChannel23[2];
240#ifdef __c33adv
241 IOREG Dummy1[5];
242 IOREG bSioAdv;
243#endif // __c33adv
244} s1c33Serial_t;
245
246/*
247 * レジスタ(INTC 260)
248 *
249 */
250typedef struct {
251 IOREG bPriority[15]; /* C33209でのアサインはbPriority[14] + */
252 IOREG bDummy0[1]; /* bDummy0[2]の構成と等しい */
253
254 IOREG bIntEnable[10]; /* C33209でのアサインはbIntEnable[8] + */
255 IOREG bDummy1[6]; /* bDummy1[8]の構成と等しい */
256
257 IOREG bIntFactor[10]; /* C33209でのアサインはbIntFactor[8] + */
258 IOREG bDummy2[6]; /* bDummy2[8]の構成と等しい */
259
260 IOREG bIDMAReq[4];
261 IOREG bIDMAEnable[4];
262 IOREG bHSDMATriger[2];
263 IOREG bHSDMASoftTrg;
264
265 IOREG bIDMAReqExt; /* C33209でのアサインはbDummy3[4]の */
266 IOREG bIDMAEnableExt; /* 構成と等しい*/
267 IOREG bDummy3[2];
268
269 IOREG bReset;
270} s1c33Intc_t;
271
272/*
273 * レジスタ(PORT 2c0)
274 */
275typedef struct {
276 struct {
277 IOREG bFuncSwitch;
278 IOREG bData;
279 } stK5Port;
280
281 IOREG bDummy;
282
283 struct {
284 IOREG bFuncSwitch;
285 IOREG bData;
286 } stK6Port;
287
288 IOREG bIntFPSwitch; /* C33L11では未使用 */
289
290 struct {
291 IOREG bSpt[2];
292 IOREG bSppt;
293 IOREG bSept;
294 } stPINT;
295
296 struct {
297 IOREG bSppk;
298 IOREG bTM16Switch; /* C33L11では未使用 */
299 IOREG bScpk[2];
300 IOREG bSmpk[2];
301 } stKINT;
302
303 struct {
304 IOREG bFuncSwitch;
305 IOREG bData;
306 IOREG bControl;
307 IOREG bFuncExt /* stPPort[0]のみC33209,C33L11 */;
308 /* とも未使用 */
309 } stPPort[4];
310} s1c33Port_t;
311
312/*
313 * レジスタ(BCU 120)
314 */
315typedef struct {
316 HIOREG uwA18_15;
317 HIOREG uwA14_13;
318 HIOREG uwA12_11;
319 HIOREG uwA10_09;
320 HIOREG uwA08_07;
321 HIOREG uwA06_04;
322 IOREG bDummy;
323 IOREG bTtbrProt;
324 HIOREG uwBus;
325 HIOREG uwDram;
326 HIOREG uwAccess;
327 LIOREG ulTtbr;
328 HIOREG uwGACtrl;
329 IOREG bBClk;
330} s1c33Bcu_t;
331
332/*
333 * レジスタ(P16TIMER 180)
334 */
335typedef struct {
336 struct {
337 HIOREG uwComp[2];
338 HIOREG uwCount;
339 IOREG bControl;
340 IOREG bDummy;
341 } stChannel[6];
342} s1c33P16Timer_t;
343
344#endif /* _MACRO_ONLY */
345#endif /* _S1C33_H_ */
Note: See TracBrowser for help on using the repository browser.