source: anotherchoice/tags/jsp-1.4.4-full-UTF8/config/h8s-renesas/h8s2339f.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: 11.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-2004 by Embedded and Real-Time Systems Laboratory
7 * Toyohashi Univ. of Technology, JAPAN
8 * Copyright (C) 2001-2004 by Dep. of Computer Science and Engineering
9 * Tomakomai National College of Technology, JAPAN
10 * Copyright (C) 2001-2007 by Industrial Technology Institute,
11 * Miyagi Prefectural Government, JAPAN
12 *
13 * 上記著作権者
14は,以下の (1)〜(4) の条件か,Free Software Foundation
15 * によってå…
16¬è¡¨ã•ã‚Œã¦ã„ã‚‹ GNU General Public License の Version 2 に記
17 * 述されている条件を満たす場合に限り,本ソフトウェア(本ソフトウェア
18 * を改変したものを含む.以下同じ)を使用・複製・改変・再é…
19å¸ƒï¼ˆä»¥ä¸‹ï¼Œ
20 * 利用と呼ぶ)することを無償で許諾する.
21 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
22 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
23 * スコード中に含まれていること.
24 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
25 * 用できる形で再é…
26å¸ƒã™ã‚‹å ´åˆã«ã¯ï¼Œå†é…
27å¸ƒã«ä¼´ã†ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆï¼ˆåˆ©ç”¨
28 * 者
29マニュアルなど)に,上記の著作権表示,この利用条件および下記
30 * の無保証規定を掲載すること.
31 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
32 * 用できない形で再é…
33å¸ƒã™ã‚‹å ´åˆã«ã¯ï¼Œæ¬¡ã®ã„ずれかの条件を満たすこ
34 * と.
35 * (a) 再é…
36å¸ƒã«ä¼´ã†ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆï¼ˆåˆ©ç”¨è€…
37マニュアルなど)に,上記の著
38 * 作権表示,この利用条件および下記の無保証規定を掲載すること.
39 * (b) 再é…
40å¸ƒã®å½¢æ…
41‹ã‚’,別に定める方法によって,TOPPERSプロジェクトに
42 * 報告すること.
43 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
44 * 害からも,上記著作権者
45およびTOPPERSプロジェクトをå…
46è²¬ã™ã‚‹ã“と.
47 *
48 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者
49お
50 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,その適用可能性も
51 * 含めて,いかなる保証も行わない.また,本ソフトウェアの利用により直
52 * 接的または間接的に生じたいかなる損害に関しても,その責任を負わない.
53 */
54
55#ifndef _H8S_2339F_H_
56#define _H8S_2339F_H_
57
58/*
59 * H8S/2339F 用定義
60 */
61
62/*
63 * モジュールストップコントロールレジスタ
64 * (様々
65なモジュールの ON、OFF に使っているので、ここで定義する。)
66 */
67#define MSTPCR 0xff3c
68#define MSTPCR_TPU BIT13
69#define MSTPCR_SCI2 BIT7
70#define MSTPCR_SCI1 BIT6
71#define MSTPCR_SCI0 BIT5
72
73
74/*
75 * 割込みコントローラ
76 */
77/* レジスタのアドレス */
78/* システムコントロールレジスタは、既に定義済み */
79#define ISCRH 0xff2c /* IRQセンスコントロールレジスタH */
80#define ISCRL 0xff2d /* IRQセンスコントロールレジスタL */
81#define IER 0xff2e /* IRQイネーブルレジスタ */
82#define ISR 0xff2f /* IRQステータスレジスタ */
83#define IPRA 0xfec4 /* インタラプトプライオリティレジスタA */
84#define IPRB 0xfec5 /* インタラプトプライオリティレジスタB */
85#define IPRC 0xfec6 /* インタラプトプライオリティレジスタC */
86#define IPRD 0xfec7 /* インタラプトプライオリティレジスタD */
87#define IPRE 0xfec8 /* インタラプトプライオリティレジスタE */
88#define IPRF 0xfec9 /* インタラプトプライオリティレジスタF */
89#define IPRG 0xfeca /* インタラプトプライオリティレジスタG */
90#define IPRH 0xfecb /* インタラプトプライオリティレジスタH */
91#define IPRI 0xfecc /* インタラプトプライオリティレジスタI */
92#define IPRJ 0xfecd /* インタラプトプライオリティレジスタJ */
93#define IPRK 0xfece /* インタラプトプライオリティレジスタK */
94
95/* 各レジスタのビットパターン */
96
97/* IPRx (x = A-K) */
98#define IPR6 BIT6
99#define IPR5 BIT5
100#define IPR4 BIT4
101#define IPR2 BIT2
102#define IPR1 BIT1
103#define IPR0 BIT0
104
105/* icu_set_ilv用 */
106#define IPR_UPR TRUE
107#define IPR_LOW FALSE
108#define IPR_UPR_MASK (IPR6|IPR5|IPR4) /* IPR上位ビットマスク */
109#define IPR_LOW_MASK (IPR2|IPR1|IPR0) /* IPR下位ビットマスク */
110
111/* IER */
112#define IRQ7E BIT7
113#define IRQ6E BIT6
114#define IRQ5E BIT5
115#define IRQ4E BIT4
116#define IRQ3E BIT3
117#define IRQ2E BIT2
118#define IRQ1E BIT1
119#define IRQ0E BIT0
120
121/* ISCRH */
122#define IRQ7SCB BIT7
123#define IRQ7SCA BIT6
124#define IRQ6SCB BIT5
125#define IRQ6SCA BIT4
126#define IRQ5SCB BIT3
127#define IRQ5SCA BIT2
128#define IRQ4SCB BIT1
129#define IRQ4SCA BIT0
130
131/* ISCRL */
132#define IRQ3SCB BIT7
133#define IRQ3SCA BIT6
134#define IRQ2SCB BIT5
135#define IRQ2SCA BIT4
136#define IRQ1SCB BIT3
137#define IRQ1SCA BIT2
138#define IRQ0SCB BIT1
139#define IRQ0SCA BIT0
140
141/* ISR */
142#define IRQ7F BIT7
143#define IRQ6F BIT6
144#define IRQ5F BIT5
145#define IRQ4F BIT4
146#define IRQ3F BIT3
147#define IRQ2F BIT2
148#define IRQ1F BIT1
149#define IRQ0F BIT0
150
151/* 割込み例外処理ベクタテーブルのベクタ番号 */
152 /* 要求発生å…
153ƒ */
154#define IRQ_POWRESET 0 /* パワーオンリセット */
155#define IRQ_MANRESET 1 /* マニュアルリセット */
156/* 2-4 は、システム予約 */
157#define IRQ_TRACE 5 /* トレース */
158/* 6 は、システム予約 */
159#define IRQ_NMI 7 /* 外部端子 */
160#define IRQ_TRAP0 8 /* トラップ命令 */
161#define IRQ_TRAP1 9 /* トラップ命令 */
162#define IRQ_TRAP2 10 /* トラップ命令 */
163#define IRQ_TRAP3 11 /* トラップ命令 */
164/* 12-15 は、システム予約 */
165#define IRQ_IRQ0 16 /* 外部端子 */
166#define IRQ_IRQ1 17 /* 外部端子 */
167#define IRQ_IRQ2 18 /* 外部端子 */
168#define IRQ_IRQ3 19 /* 外部端子 */
169#define IRQ_IRQ4 20 /* 外部端子 */
170#define IRQ_IRQ5 21 /* 外部端子 */
171#define IRQ_IRQ6 22 /* 外部端子 */
172#define IRQ_IRQ7 23 /* 外部端子 */
173#define IRQ_SWDTEND 24 /* DTC */
174#define IRQ_WOVI 25 /* ウォッチドッグタイマ */
175#define IRQ_CMI 26 /* リフレッシュコントローラ */
176/* 27 番は、リザーブ */
177#define IRQ_ADI 28 /* A/D */
178/* 29, 30, 31 番は、リザーブ */
179#define IRQ_TGI0A 32 /* TPUチャネル0 */
180#define IRQ_TGI0B 33 /* TPUチャネル0 */
181#define IRQ_TGI0C 34 /* TPUチャネル0 */
182#define IRQ_TGI0D 35 /* TPUチャネル0 */
183#define IRQ_TCI0V 36 /* TPUチャネル0 */
184/* 37, 38, 39 番は、リザーブ */
185#define IRQ_TGI1A 40 /* TPUチャネル1 */
186#define IRQ_TGI1B 41 /* TPUチャネル1 */
187#define IRQ_TCI1V 42 /* TPUチャネル1 */
188#define IRQ_TCI1U 43 /* TPUチャネル1 */
189#define IRQ_TGI2A 44 /* TPUチャネル2 */
190#define IRQ_TGI2B 45 /* TPUチャネル2 */
191#define IRQ_TCI2V 46 /* TPUチャネル2 */
192#define IRQ_TCI2U 47 /* TPUチャネル2 */
193#define IRQ_TGI3A 48 /* TPUチャネル3 */
194#define IRQ_TGI3B 49 /* TPUチャネル3 */
195#define IRQ_TGI3C 50 /* TPUチャネル3 */
196#define IRQ_TGI3D 51 /* TPUチャネル3 */
197#define IRQ_TCI3V 52 /* TPUチャネル3 */
198/* 53, 54, 55 番は、リザーブ */
199#define IRQ_TGI4A 56 /* TPUチャネル4 */
200#define IRQ_TGI4B 57 /* TPUチャネル4 */
201#define IRQ_TCI4V 58 /* TPUチャネル4 */
202#define IRQ_TCI4U 59 /* TPUチャネル4 */
203#define IRQ_TGI5A 60 /* TPUチャネル5 */
204#define IRQ_TGI5B 61 /* TPUチャネル5 */
205#define IRQ_TCI5V 62 /* TPUチャネル5 */
206#define IRQ_TCI5U 63 /* TPUチャネル5 */
207/* 64, 65, 66, 67, 68, 69, 70, 71 番は、リザーブ */
208#define IRQ_DEND0A 72 /* DMAC */
209#define IRQ_DEND0B 73 /* DMAC */
210#define IRQ_DEND1A 74 /* DMAC */
211#define IRQ_DEND1B 75 /* DMAC */
212/* 76, 77, 78, 79 番は、リザーブ */
213#define IRQ_ERI0 80 /* SCIチャネル0 */
214#define IRQ_RXI0 81 /* SCIチャネル0 */
215#define IRQ_TXI0 82 /* SCIチャネル0 */
216#define IRQ_TEI0 83 /* SCIチャネル0 */
217#define IRQ_ERI1 84 /* SCIチャネル1 */
218#define IRQ_RXI1 85 /* SCIチャネル1 */
219#define IRQ_TXI1 86 /* SCIチャネル1 */
220#define IRQ_TEI1 87 /* SCIチャネル1 */
221#define IRQ_ERI2 88 /* SCIチャネル2 */
222#define IRQ_RXI2 89 /* SCIチャネル2 */
223#define IRQ_TXI2 90 /* SCIチャネル2 */
224#define IRQ_TEI2 91 /* SCIチャネル2 */
225
226/*
227 * バスコントローラ
228 */
229/* レジスタのアドレス */
230#define ABWCR 0xfed0 /* バス幅
231コントロールレジスタ */
232#define ASTCR 0xfed1 /* アクセスステートコントロールレジスタ */
233#define WCRH 0xfed2 /* ウェイトコントロールレジスタH */
234#define WCRL 0xfed3 /* ウェイトコントロールレジスタL */
235#define BCRH 0xfed4 /* バスコントロールレジスタH */
236#define BCRL 0xfed5 /* バスコントロールレジスタL */
237#define MCR 0xfed6 /* メモリコントロールレジスタ */
238#define DRAMCR 0xfed7 /* DRAMコントロールレジスタ */
239#define RTCNT 0xfed8 /* リフレッシュタイマカウンタ */
240#define RTCOR 0xfed9 /* リフレッシュタイマコンスタントレジスタ */
241
242/* 各レジスタのビットパターン */
243
244/* ASTCR */
245#define AST7 BIT7
246#define AST6 BIT6
247#define AST5 BIT5
248#define AST4 BIT4
249#define AST3 BIT3
250#define AST2 BIT2
251#define AST1 BIT1
252#define AST0 BIT0
253
254/* WCRH */
255#define W71 BIT7
256#define W70 BIT6
257#define W61 BIT5
258#define W60 BIT4
259#define W51 BIT3
260#define W50 BIT2
261#define W41 BIT1
262#define W40 BIT0
263
264/* WCRL */
265#define W31 BIT7
266#define W30 BIT6
267#define W21 BIT5
268#define W20 BIT4
269#define W11 BIT3
270#define W10 BIT2
271#define W01 BIT1
272#define W00 BIT0
273
274/* BCRH */
275#define ICIS1 BIT7
276#define ICIS0 BIT6
277#define BRSTRM BIT5
278#define BRSTS1 BIT4
279#define BRSTS0 BIT3
280#define RMTS2 BIT2
281#define RMTS1 BIT1
282#define RMTS0 BIT0
283
284
285/*
286 * I/O ポート
287 */
288
289#define TNUM_IO_PORT 15 /* I/Oポートの本数 */
290
291/* 各ポートレジスタのアドレス */
292
293/* port1 */
294#define P1DDR 0xfeb0
295#define P1DR 0xff60
296#define PORT1 0xff50
297
298/* port2 */
299#define P2DDR 0xfeb1
300#define P2DR 0xff61
301#define PORT2 0xff51
302
303/* port3 */
304#define P3DDR 0xfeb2
305#define P3DR 0xff62
306#define PORT3 0xff52
307#define P3ODR 0xff76
308
309/* port4 */
310#define PORT4 0xff53
311
312/* port5 */
313#define P5DDR 0xfeb4
314#define P5DR 0xff64
315#define PORT5 0xff54
316
317/* port6 */
318#define P6DDR 0xfeb5
319#define P6DR 0xff65
320#define PORT6 0xff55
321
322/* port7 */
323#define P7DDR 0xfeb6
324
325/* port8 */
326#define P8DDR 0xfeb7
327
328/* port9 */
329#define P9DDR 0xfeb8
330
331/* portA */
332#define PADDR 0xfeb9
333#define PADR 0xff69
334#define PORTA 0xff59
335
336/* portB */
337#define PBDDR 0xfeba
338
339/* portC */
340#define PCDDR 0xfebb
341
342/* portD */
343#define PDDDR 0xfebc
344
345/* portE */
346#define PEDDR 0xfebd
347#define PEDR 0xff6d
348#define PORTE 0xff5d
349#define PEPCR 0xff74
350
351/* portF */
352#define PFDDR 0xfebe
353#define PFDR 0xff6e
354#define PORTF 0xff5e
355
356/* portG */
357#define PGDDR 0xfebf /* ポートGデータディスクリプションレジスタ */
358#define PGDR 0xff6f /* ポートGデータレジスタ */
359#define PORTG 0xff5f /* ポートGレジスタ */
360
361/* 各レジスタのビットパターン */
362
363/* P2DDR */
364#define P27DDR BIT7
365#define P26DDR BIT6
366#define P25DDR BIT5
367#define P24DDR BIT4
368#define P23DDR BIT3
369#define P22DDR BIT2
370#define P21DDR BIT1
371#define P20DDR BIT0
372
373/* P3DDR */
374#define P37DDR BIT7
375#define P36DDR BIT6
376#define P35DDR BIT5
377#define P34DDR BIT4
378#define P33DDR BIT3
379#define P32DDR BIT2
380#define P31DDR BIT1
381#define P30DDR BIT0
382
383/* PGDDR */
384#define PG4DDR BIT4
385#define PG3DDR BIT3
386#define PG2DDR BIT2
387#define PG1DDR BIT1
388#define PG0DDR BIT0
389
390#endif /* _H8S_2339F_H_ */
Note: See TracBrowser for help on using the repository browser.