RXduino  1.20a
RXduinoマニュアル 最終更新日 平成26年6月29日
brd_grsakura.h
説明を見る。
1 #ifndef BOARDDEF_H
2 #define BOARDDEF_H
3 
4 /**************************************************************************/
15 #define CPU_IS_RX63N
16 #define ROMSIZE (1024*1024)
17 #define RAMSIZE (128*1024)
18 #define DEFAULT_SERIAL SCI_USB0
19 #define USBVCOM_VID 0x2129
20 #define USBVCOM_PID 0x0531
21 
22 #define USB_STRING_DESCRIPTOR_DATA \
23  'G', 0x00, 'a', 0x00, 'd', 0x00, 'g', 0x00, \
24  'e', 0x00, 't', 0x00, ' ', 0x00, 'R', 0x00, \
25  'e', 0x00, 'n', 0x00, 'e', 0x00, 's', 0x00, \
26  'a', 0x00, 's', 0x00, ' ', 0x00, 'S', 0x00, \
27  'A', 0x00, 'K', 0x00, 'U', 0x00, 'R', 0x00, \
28  'A', 0x00,
29 
30 #include "tkdn_hal.h"
31 
32 // ボードに応じた定数の設定
33 #ifndef TARGET_BOARD
34  #define TARGET_BOARD BOARD_GRSAKURA
35 #endif
36 #define CPU_TYPE RX63N
37 #define BOARD_NAME "GR-SAKURA"
38 
39 #define EXISTS_SDMMC
40 //#define EXISTS_SDRAM
41 //#define EXISTS_SPIROM
42 
43 // ピン番号マクロ
44 #define PIN_P21 0
45 #define PIN_P20 1
46 #define PIN_P22 2
47 #define PIN_P23 3
48 #define PIN_P24 4
49 #define PIN_P25 5
50 #define PIN_P32 6
51 #define PIN_P33 7
52 #define PIN_PC2 8
53 #define PIN_PC3 9
54 #define PIN_PC4 10
55 #define PIN_PC6 11
56 #define PIN_PC7 12
57 #define PIN_PC5 13
58 #define PIN_P40 14
59 #define PIN_P41 15
60 #define PIN_P42 16
61 #define PIN_P43 17
62 #define PIN_P44 18
63 #define PIN_P45 19
64 #define PIN_P46 20
65 #define PIN_P47 21
66 #define PIN_PC0 22
67 #define PIN_PC1 23
68 #define PIN_P50 24
69 #define PIN_P51 25
70 #define PIN_P52 26
71 #define PIN_P53 27
72 #define PIN_P54 28
73 #define PIN_P55 29
74 #define PIN_P12 30
75 #define PIN_P13 31
76 #define PIN_P14 32
77 #define PIN_P15 33
78 #define PIN_P16 34
79 #define PIN_P17 35
80 #define PIN_PD0 36
81 #define PIN_PD1 37
82 #define PIN_PD2 38
83 #define PIN_PD3 39
84 #define PIN_PD4 40
85 #define PIN_PD5 41
86 #define PIN_PD6 42
87 #define PIN_PD7 43
88 #define PIN_PE0 44
89 #define PIN_PE1 45
90 #define PIN_PE2 46
91 #define PIN_PE3 47
92 #define PIN_PE4 48
93 #define PIN_PE5 49
94 #define PIN_PE6 50
95 #define PIN_PE7 51
96 #define PIN_P07 52
97 #define PIN_P05 53
98 #define PIN_P35 54
99 #define PIN_NMI 54
100 #define PIN_PJ3 55
101 
102 // 各種ライブラリで使われる
103 #define PIN_SDMMC_CS PIN_PC0
104 #define SDMMC_RSPI_CH 0
105 #define PHY_ADDR 0x00
106 #define ETH_PORT_IS_AB
107 #define USB_HOST_CH 0
108 #define USB_FUNC_CH 0
109 #define PIN_SDMMC_KEY PIN_P15
110 
111 #define NUM_DIGITAL_PINS 56
112 #define NUM_ANALOG_INPUTS 8
113 #define analogInputToDigitalPin(p) ((p < 8) ? (p) + 14 : -1)
114 #define digitalPinHasPWM(p) (true)
115 
116 static const unsigned char SS = 10;
117 static const unsigned char MOSI = 11;
118 static const unsigned char MISO = 12;
119 static const unsigned char SCK = 13;
120 
121 static const unsigned char SDA = 18;
122 static const unsigned char SCL = 19;
123 static const unsigned char LED_BUILTIN = 100;
124 
125 static const unsigned char A0 = 14;
126 static const unsigned char A1 = 15;
127 static const unsigned char A2 = 16;
128 static const unsigned char A3 = 17;
129 static const unsigned char A4 = 18;
130 static const unsigned char A5 = 19;
131 static const unsigned char A6 = 20;
132 static const unsigned char A7 = 21;
133 
134 #endif /* BOARDDEF_H */
135 
136 // 以下、ボード上のピン配置を定義する
137 
138 #ifdef COMPILE_TKDNGPIO
139 const unsigned char GPIO_PINMAP[] =
140 {
141  _PORT2 , _BIT1, // Arduino-D0 : P21
142  _PORT2 , _BIT0, // Arduino-D1 : P20
143  _PORT2 , _BIT2, // Arduino-D2 : P22
144  _PORT2 , _BIT3, // Arduino-D3 : P23
145  _PORT2 , _BIT4, // Arduino-D4 : P24
146  _PORT2 , _BIT5, // Arduino-D5 : P25
147  _PORT3 , _BIT2, // Arduino-D6 : P32
148  _PORT3 , _BIT3, // Arduino-D7 : P33
149  _PORTC , _BIT2, // Arduino-D8 : PC2
150  _PORTC , _BIT3, // Arduino-D9 : PC3
151  _PORTC , _BIT4, // Arduino-D10 : PC4
152  _PORTC , _BIT6, // Arduino-D11 : PC6
153  _PORTC , _BIT7, // Arduino-D12 : PC7
154  _PORTC , _BIT5, // Arduino-D13 : PC5
155  _PORT4 , _BIT0, // Arduino-D14 : P40
156  _PORT4 , _BIT1, // Arduino-D15 : P41
157  _PORT4 , _BIT2, // Arduino-D16 : P42
158  _PORT4 , _BIT3, // Arduino-D17 : P43
159  _PORT4 , _BIT4, // Arduino-D18 : P44
160  _PORT4 , _BIT5, // Arduino-D19 : P45
161  _PORT4 , _BIT6, // 20 : P46
162  _PORT4 , _BIT7, // 21 : P47
163  _PORTC , _BIT0, // 22 : PC0
164  _PORTC , _BIT1, // 23 : PC1
165  _PORT5 , _BIT0, // 24 : P50
166  _PORT5 , _BIT1, // 25 : P51
167  _PORT5 , _BIT2, // 26 : P52
168  _PORT5 , _BIT3, // 27 : P53
169  _PORT5 , _BIT4, // 28 : P54
170  _PORT5 , _BIT5, // 29 : P55
171  _PORT1 , _BIT2, // 30 : P12
172  _PORT1 , _BIT3, // 31 : P13
173  _PORT1 , _BIT4, // 32 : P14
174  _PORT1 , _BIT5, // 33 : P15
175  _PORT1 , _BIT6, // 34 : P16
176  _PORT1 , _BIT7, // 35 : P17
177  _PORTD , _BIT0, // 36 : PD0
178  _PORTD , _BIT1, // 37 : PD1
179  _PORTD , _BIT2, // 38 : PD2
180  _PORTD , _BIT3, // 39 : PD3
181  _PORTD , _BIT4, // 40 : PD4
182  _PORTD , _BIT5, // 41 : PD5
183  _PORTD , _BIT6, // 42 : PD6
184  _PORTD , _BIT7, // 43 : PD7
185  _PORTE , _BIT0, // 44 : PE0
186  _PORTE , _BIT1, // 45 : PE1
187  _PORTE , _BIT2, // 46 : PE2
188  _PORTE , _BIT3, // 47 : PE3
189  _PORTE , _BIT4, // 48 : PE4
190  _PORTE , _BIT5, // 49 : PE5
191  _PORTE , _BIT6, // 50 : PE6
192  _PORTE , _BIT7, // 51 : PE7
193  _PORT0 , _BIT7, // 52 : P07
194  _PORT0 , _BIT5, // 53 : P05
195  _PORT3 , _BIT5, // 54 : P35/NMI
196  _PORTJ , _BIT3, // 55 : PJ3
197 };
198 
199 const unsigned char SFP_PINMAP[] =
200 {
201  _PORTA , _BIT0, // LED0
202  _PORTA , _BIT1, // LED1
203  _PORTA , _BIT2, // LED2
204  _PORTA , _BIT6, // LED3
205  _PORTA , _BIT6, // BUZZ
206  _PORTA , _BIT7, // SW
207  _PORTC , _BIT4, // SPI_CS0
208  _PORTC , _BIT0, // SPI_CS1
209  _PORTC , _BIT1, // SPI_CS2
210  _PORTC , _BIT2, // SPI_CS3
211 };
212 
213 #endif
特電HALのヘッダファイル