RXduino  1.20a
RXduinoマニュアル 最終更新日 平成26年6月29日
brd_akirx62.h
説明を見る。
1 #ifndef BOARDDEF_H
2 #define BOARDDEF_H
3 
4 /**************************************************************************/
15 #define CPU_IS_RX62N
16 #define ROMSIZE (512*1024)
17 #define RAMSIZE (96*1024)
18 #define DEFAULT_SERIAL SCI_USB0
19 #define USBVCOM_VID 0x2129
20 #define USBVCOM_PID 0x050f
21 
22 #define USB_STRING_DESCRIPTOR_DATA \
23  'R', 0x00, 'X', 0x00, 'd', 0x00, 'u', 0x00, \
24  'i', 0x00, 'n', 0x00, 'o', 0x00, ' ', 0x00, \
25  'U', 0x00, 'S', 0x00, 'B', 0x00, ' ', 0x00, \
26  'V', 0x00, 'C', 0x00, 'O', 0x00, 'M', 0x00, \
27  ' ', 0x00, 'p', 0x00, 'o', 0x00, 'r', 0x00, \
28  't', 0x00,
29 
30 #include "tkdn_hal.h"
31 
32 // ボードに応じた定数の設定
33 #ifndef TARGET_BOARD
34  #define TARGET_BOARD BOARD_AKIRX62
35 #endif
36 #define CPU_TYPE RX62N
37 #define BOARD_NAME "AKI-RX62"
38 
39 #define EXISTS_SDMMC
40 //#define EXISTS_SDRAM
41 //#define EXISTS_SPIROM
42 
43 // ピン番号マクロ
44 #define PIN_PD0 1
45 #define PIN_PD1 2
46 #define PIN_PD2 3
47 #define PIN_PD3 4
48 #define PIN_PD4 5
49 #define PIN_PD5 6
50 #define PIN_PD6 7
51 #define PIN_PD7 8
52 #define PIN_PE0 9
53 #define PIN_PE1 10
54 #define PIN_PE2 11
55 #define PIN_PE3 12
56 #define PIN_PE4 13
57 #define PIN_PE5 14
58 #define PIN_PE6 15
59 #define PIN_PE7 16
60 #define PIN_P40 17
61 #define PIN_P41 18
62 #define PIN_P42 19
63 #define PIN_P43 20
64 #define PIN_P44 21
65 #define PIN_P45 22
66 #define PIN_P46 23
67 #define PIN_P47 24
68 #define PIN_P30 25
69 #define PIN_P31 26
70 #define PIN_P32 27
71 #define PIN_P33 28
72 #define PIN_P34 29
73 #define PIN_P35 30
74 #define PIN_P05 31
75 #define PIN_P07 32
76 // pin33-pin40は操作不可
77 #define PIN_PA0 41
78 #define PIN_PA1 42
79 #define PIN_PA2 43
80 #define PIN_PA3 44
81 #define PIN_PA4 45
82 #define PIN_PA5 46
83 #define PIN_PA6 47
84 #define PIN_PA7 48
85 #define PIN_PB0 49
86 #define PIN_PB1 50
87 #define PIN_PB2 51
88 #define PIN_PB3 52
89 #define PIN_PB4 53
90 #define PIN_PB5 54
91 #define PIN_PB6 55
92 #define PIN_PB7 56
93 #define PIN_PC0 57
94 #define PIN_PC1 58
95 #define PIN_PC2 59
96 #define PIN_PC3 60
97 #define PIN_PC4 61
98 #define PIN_PC5 62
99 #define PIN_PC6 63
100 #define PIN_PC7 64
101 #define PIN_P20 65
102 #define PIN_P21 66
103 #define PIN_P22 67
104 #define PIN_P23 68
105 #define PIN_P24 69
106 #define PIN_P25 70
107 #define PIN_P26 71
108 #define PIN_P27 72
109 #define PIN_P50 73
110 #define PIN_P51 74
111 #define PIN_P52 75
112 #define PIN_P53 76
113 #define PIN_P54 77
114 #define PIN_P55 78
115 #define PIN_P56 79
116 #define PIN_P57 80
117 #define PIN_NMI 30
118 
119 // 各種ライブラリで使われる
120 #define PIN_SDMMC_CS PIN_PC0
121 #define SDMMC_RSPI_CH 0
122 #define PHY_ADDR 0x00
123 #define ETH_PORT_IS_AB
124 #define USB_HOST_CH 0
125 #define USB_FUNC_CH 0
126 
127 #define NUM_DIGITAL_PINS 72
128 #define NUM_ANALOG_INPUTS 8
129 #define analogInputToDigitalPin(p) ((p < 8) ? (p) + 17 : -1)
130 #define digitalPinHasPWM(p) (true)
131 
132 static const unsigned char SS = 10;
133 static const unsigned char MOSI = 11;
134 static const unsigned char MISO = 12;
135 static const unsigned char SCK = 13;
136 
137 static const unsigned char SDA = 18;
138 static const unsigned char SCL = 19;
139 static const unsigned char LED_BUILTIN = 100;
140 
141 static const unsigned char A0 = 17;
142 static const unsigned char A1 = 18;
143 static const unsigned char A2 = 19;
144 static const unsigned char A3 = 20;
145 static const unsigned char A4 = 21;
146 static const unsigned char A5 = 22;
147 static const unsigned char A6 = 23;
148 static const unsigned char A7 = 24;
149 
150 #endif /* BOARDDEF_H */
151 
152 // 以下、ボード上のピン配置を定義する
153 
154 #ifdef COMPILE_TKDNGPIO
155 const unsigned char GPIO_PINMAP[] =
156 {
157  _PORTX , _BITX, // !< @brief 操作不可能ピン
158  _PORTD , _BIT0, // !< @brief CN1の1
159  _PORTD , _BIT1, // !< @brief CN1の2
160  _PORTD , _BIT2, // !< @brief CN1の3
161  _PORTD , _BIT3, // !< @brief CN1の4
162  _PORTD , _BIT4, // !< @brief CN1の5
163  _PORTD , _BIT5, // !< @brief CN1の6
164  _PORTD , _BIT6, // !< @brief CN1の7
165  _PORTD , _BIT7, // !< @brief CN1の8
166  _PORTE , _BIT0, // !< @brief CN1の9
167  _PORTE , _BIT1, // !< @brief CN1の10
168  _PORTE , _BIT2, // !< @brief CN1の11
169  _PORTE , _BIT3, // !< @brief CN1の12
170  _PORTE , _BIT4, // !< @brief CN1の13
171  _PORTE , _BIT5, // !< @brief CN1の14
172  _PORTE , _BIT6, // !< @brief CN1の15
173  _PORTE , _BIT7, // !< @brief CN1の16
174  _PORT4 , _BIT0, // !< @brief CN1の9
175  _PORT4 , _BIT1, // !< @brief CN1の10
176  _PORT4 , _BIT2, // !< @brief CN1の11
177  _PORT4 , _BIT3, // !< @brief CN1の12
178  _PORT4 , _BIT4, // !< @brief CN1の13
179  _PORT4 , _BIT5, // !< @brief CN1の14
180  _PORT4 , _BIT6, // !< @brief CN1の15
181  _PORT4 , _BIT7, // !< @brief CN1の16
182  _PORT3 , _BIT0, // !< @brief CN1の17
183  _PORT3 , _BIT1, // !< @brief CN1の18
184  _PORT3 , _BIT2, // !< @brief CN1の19
185  _PORT3 , _BIT3, // !< @brief CN1の20
186  _PORT3 , _BIT4, // !< @brief CN1の21
187  _PORT3 , _BIT5, // !< @brief CN1の22
188  _PORT0 , _BIT5, // !< @brief CN1の23
189  _PORT0 , _BIT7, // !< @brief CN1の24
190  _PORTX , _BITX, // !< @brief 操作不可能ピン
191  _PORTX , _BITX, // !< @brief 操作不可能ピン
192  _PORTX , _BITX, // !< @brief 操作不可能ピン
193  _PORTX , _BITX, // !< @brief 操作不可能ピン
194  _PORTX , _BITX, // !< @brief 操作不可能ピン
195  _PORTX , _BITX, // !< @brief 操作不可能ピン
196  _PORTX , _BITX, // !< @brief 操作不可能ピン
197  _PORTX , _BITX, // !< @brief 操作不可能ピン
198  _PORTA , _BIT0, // !< @brief CN2の1
199  _PORTA , _BIT1, // !< @brief CN2の2
200  _PORTA , _BIT2, // !< @brief CN2の3
201  _PORTA , _BIT3, // !< @brief CN2の4
202  _PORTA , _BIT4, // !< @brief CN2の5
203  _PORTA , _BIT5, // !< @brief CN2の6
204  _PORTA , _BIT6, // !< @brief CN2の7
205  _PORTA , _BIT7, // !< @brief CN2の8
206  _PORTB , _BIT0, // !< @brief CN2の9
207  _PORTB , _BIT1, // !< @brief CN2の10
208  _PORTB , _BIT2, // !< @brief CN2の11
209  _PORTB , _BIT3, // !< @brief CN2の12
210  _PORTB , _BIT4, // !< @brief CN2の13
211  _PORTB , _BIT5, // !< @brief CN2の14
212  _PORTB , _BIT6, // !< @brief CN2の15
213  _PORTB , _BIT7, // !< @brief CN2の16
214  _PORTC , _BIT0, // !< @brief CN2の17
215  _PORTC , _BIT1, // !< @brief CN2の18
216  _PORTC , _BIT2, // !< @brief CN2の19
217  _PORTC , _BIT3, // !< @brief CN2の20
218  _PORTC , _BIT4, // !< @brief CN2の21
219  _PORTC , _BIT5, // !< @brief CN2の22
220  _PORTC , _BIT6, // !< @brief CN2の23
221  _PORTC , _BIT7, // !< @brief CN2の24
222  _PORT2 , _BIT0, // !< @brief CN2の25
223  _PORT2 , _BIT1, // !< @brief CN2の26
224  _PORT2 , _BIT2, // !< @brief CN2の27
225  _PORT2 , _BIT3, // !< @brief CN2の28
226  _PORT2 , _BIT4, // !< @brief CN2の29
227  _PORT2 , _BIT5, // !< @brief CN2の30
228  _PORT2 , _BIT6, // !< @brief CN2の31
229  _PORT2 , _BIT7, // !< @brief CN2の32
230  _PORT5 , _BIT0, // !< @brief CN2の33
231  _PORT5 , _BIT1, // !< @brief CN2の34
232  _PORT5 , _BIT2, // !< @brief CN2の35
233  _PORT5 , _BIT3, // !< @brief CN2の36
234  _PORT5 , _BIT4, // !< @brief CN2の37
235  _PORT5 , _BIT5, // !< @brief CN2の38
236  _PORT5 , _BIT6, // !< @brief CN2の39
237  _PORT5 , _BIT7, // !< @brief CN2の40
238 };
239 
240 const unsigned char SFP_PINMAP[] =
241 {
242  _PORTX , _BITX, // LED0
243  _PORTX , _BITX, // LED1
244  _PORTX , _BITX, // LED2
245  _PORTX , _BITX, // LED3
246  _PORTX , _BITX, // BUZZ
247  _PORTX , _BITX, // SW
248  _PORTC , _BIT4, // SPI_CS0
249  _PORTC , _BIT0, // SPI_CS1
250  _PORTC , _BIT1, // SPI_CS2
251  _PORTC , _BIT2, // SPI_CS3
252 };
253 
254 #endif
特電HALのヘッダファイル