RXduino  1.20a
RXduinoマニュアル 最終更新日 平成26年6月29日
brd_rxmega.h
1 #ifndef BOARDDEF_H
2 #define BOARDDEF_H
3 
4 // これはボード固有のカスタマイズを行うためのヘッダファイルです
5 // トップディレクトリでmake use_***を実行すると自動的に書き換わります
6 // RXduinoのSerialクラスが使うデフォルトのポート番号
7 
8 #define CPU_IS_RX62N
9 #define ROMSIZE (512*1024)
10 #define RAMSIZE (96*1024)
11 #define DEFAULT_SERIAL SCI_USB0
12 #define USBVCOM_VID 0x2129
13 #define USBVCOM_PID 0x0401
14 
15 #include "tkdn_hal.h"
16 
17 // ボードに応じた定数の設定
18 #ifndef TARGET_BOARD
19  #define TARGET_BOARD BOARD_ULT62N0_SDRAM
20 #endif
21 #define CPU_TYPE RX62N
22 #define BOARD_NAME "RXMEGA"
23 
24 // ピン番号マクロ
25 #define PIN_P00 0
26 #define PIN_P01 1
27 #define PIN_P02 2
28 #define PIN_P03 3
29 #define PIN_P05 4
30 #define PIN_P07 5
31 #define PIN_P20 6
32 #define PIN_P21 7
33 #define PIN_P32 8
34 #define PIN_P33 9
35 #define PIN_P34 10
36 #define PIN_P35 11
37 #define PIN_P10 12
38 #define PIN_P11 13
39 #define PIN_P12 14
40 #define PIN_P13 15
41 #define PIN_P73 16 // CS3
42 #define PIN_P40 17
43 #define PIN_P41 18
44 #define PIN_P42 19
45 #define PIN_P43 20
46 #define PIN_P44 21
47 #define PIN_P45 22
48 #define PIN_P46 23
49 #define PIN_P47 24
50 #define PIN_PC0 25
51 #define PIN_PC1 26
52 #define PIN_PC2 27
53 #define PIN_PC3 28
54 #define PIN_PC4 29
55 #define PIN_PC5 30
56 #define PIN_PC6 31
57 #define PIN_PC7 32
58 #define PIN_P60 33 // CS0
59 #define PIN_P22 34 // EDREQ0
60 #define PIN_P23 35 // EDACK0
61 #define PIN_P24 36 // EDREQ1
62 #define PIN_P25 37 // EDACK1
63 #define PIN_P52 38
64 #define PIN_P51 39
65 #define PIN_P50 40
66 #define PIN_P53 41 // BCLK
67 #define PIN_PD0 42 // D0
68 #define PIN_PD1 43 // D1
69 #define PIN_PD2 44 // D2
70 #define PIN_PD3 45 // D3
71 #define PIN_PD4 46 // D4
72 #define PIN_PD5 47 // D5
73 #define PIN_PD6 48 // D6
74 #define PIN_PD7 49 // D7
75 #define PIN_PE0 50 // D8
76 #define PIN_PE1 51 // D9
77 #define PIN_PE2 52 // D10
78 #define PIN_PE3 53 // D11
79 #define PIN_PE4 54 // D12
80 #define PIN_PE5 55 // D13
81 #define PIN_PE6 56 // D14
82 #define PIN_PE7 57 // D15
83 
84 #define PIN_CS3 16
85 #define PIN_CS0 33
86 #define PIN_REQ0 34
87 #define PIN_ACK0 35
88 #define PIN_REQ1 36
89 #define PIN_ACK1 37
90 #define PIN_BCLK 41
91 #define PIN_BUSD0 42
92 #define PIN_BUSD1 43
93 #define PIN_BUSD2 44
94 #define PIN_BUSD3 45
95 #define PIN_BUSD4 46
96 #define PIN_BUSD5 47
97 #define PIN_BUSD6 48
98 #define PIN_BUSD7 49
99 #define PIN_BUSD8 50
100 #define PIN_BUSD9 51
101 #define PIN_BUSD10 52
102 #define PIN_BUSD11 53
103 #define PIN_BUSD12 54
104 #define PIN_BUSD13 55
105 #define PIN_BUSD14 56
106 #define PIN_BUSD15 57
107 
108 #endif /* BOARDDEF_H */
109 
110 #ifdef COMPILE_TKDNGPIO
111 const unsigned char GPIO_PINMAP[] =
112 {
113  _PORT0 , _BIT0, // 0
114  _PORT0 , _BIT1, // 1
115  _PORT0 , _BIT2, // 2
116  _PORT0 , _BIT3, // 3
117  _PORT0 , _BIT5, // 4
118  _PORT0 , _BIT7, // 5
119  _PORT2 , _BIT0, // 6
120  _PORT2 , _BIT1, // 7
121  _PORT3 , _BIT2, // 8
122  _PORT3 , _BIT3, // 9
123  _PORT3 , _BIT4, // 10
124  _PORT3 , _BIT5, // 11
125  _PORT1 , _BIT0, // 12
126  _PORT1 , _BIT1, // 13
127  _PORT1 , _BIT2, // 14
128  _PORT1 , _BIT3, // 15
129  _PORT7 , _BIT3, // 16
130  _PORT4 , _BIT0, // 17
131  _PORT4 , _BIT1, // 18
132  _PORT4 , _BIT2, // 19
133  _PORT4 , _BIT3, // 20
134  _PORT4 , _BIT4, // 21
135  _PORT4 , _BIT5, // 22
136  _PORT4 , _BIT6, // 23
137  _PORT4 , _BIT7, // 24
138  _PORTC , _BIT0, // 25
139  _PORTC , _BIT1, // 26
140  _PORTC , _BIT2, // 27
141  _PORTC , _BIT3, // 28
142  _PORTC , _BIT4, // 29
143  _PORTC , _BIT5, // 30
144  _PORTC , _BIT6, // 31
145  _PORTC , _BIT7, // 32
146  _PORT6 , _BIT0, // 33
147  _PORT2 , _BIT2, // 34 // EDREQ0
148  _PORT2 , _BIT3, // 35 // EDACK0
149  _PORT2 , _BIT4, // 36 // EDREQ1
150  _PORT2 , _BIT5, // 37 // EDACK1
151  _PORT5 , _BIT2, // 38
152  _PORT5 , _BIT1, // 39
153  _PORT5 , _BIT0, // 40
154  _PORT5 , _BIT3, // 41 // BCLK
155  _PORTD , _BIT0, // 42
156  _PORTD , _BIT1, // 43
157  _PORTD , _BIT2, // 44
158  _PORTD , _BIT3, // 45
159  _PORTD , _BIT4, // 46
160  _PORTD , _BIT5, // 47
161  _PORTD , _BIT6, // 48
162  _PORTD , _BIT7, // 49
163  _PORTE , _BIT0, // 50
164  _PORTE , _BIT1, // 51
165  _PORTE , _BIT2, // 52
166  _PORTE , _BIT3, // 53
167  _PORTE , _BIT4, // 54
168  _PORTE , _BIT5, // 55
169  _PORTE , _BIT6, // 56
170  _PORTE , _BIT7, // 57
171 };
172 
173 
174 const unsigned char SFP_PINMAP[] =
175 {
176  _PORT5 , _BIT5, // LED0
177  _PORT5 , _BIT6, // LED1
178  _PORT5 , _BIT7, // LED2
179  _PORT8 , _BIT4, // LED3
180  _PORT8 , _BIT4, // BUZZ
181  _PORT8 , _BIT5, // SW
182  _PORT3 , _BIT1, // SPI_CS0
183  _PORTC , _BIT0, // SPI_CS1
184  _PORTC , _BIT1, // SPI_CS2
185  _PORTC , _BIT2, // SPI_CS3
186 };
187 
188 #endif
特電HALのヘッダファイル