RXduino  1.20a
RXduinoマニュアル 最終更新日 平成26年6月29日
brd_np1055.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 0x0551
21 
22 #define USB_STRING_DESCRIPTOR_DATA \
23  'T', 0x00, 'o', 0x00, 'r', 0x00, 'a', 0x00, \
24  'g', 0x00, 'i', 0x00, ' ', 0x00, 'R', 0x00, \
25  'X', 0x00, 'm', 0x00, 'i', 0x00, 'c', 0x00, \
26  'o', 0x00, 'n', 0x00, ' ', 0x00, 'B', 0x00, \
27  'O', 0x00, 'A', 0x00, 'R', 0x00, 'D', 0x00, \
28  '!', 0x00,
29 
30 #include "tkdn_hal.h"
31 
32 // ボードに応じた定数の設定
33 #ifndef TARGET_BOARD
34  #define TARGET_BOARD BOARD_NP1055
35 #endif
36 #define CPU_TYPE RX63N
37 #define BOARD_NAME "NP1055"
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 
110 #define NUM_DIGITAL_PINS 56
111 #define NUM_ANALOG_INPUTS 8
112 #define analogInputToDigitalPin(p) ((p < 8) ? (p) + 14 : -1)
113 #define digitalPinHasPWM(p) (true)
114 
115 static const unsigned char SS = 10;
116 static const unsigned char MOSI = 11;
117 static const unsigned char MISO = 12;
118 static const unsigned char SCK = 13;
119 
120 static const unsigned char SDA = 18;
121 static const unsigned char SCL = 19;
122 static const unsigned char LED_BUILTIN = 100;
123 
124 static const unsigned char A0 = 14;
125 static const unsigned char A1 = 15;
126 static const unsigned char A2 = 16;
127 static const unsigned char A3 = 17;
128 static const unsigned char A4 = 18;
129 static const unsigned char A5 = 19;
130 static const unsigned char A6 = 20;
131 static const unsigned char A7 = 21;
132 
133 #endif /* BOARDDEF_H */
134 
135 // 以下、ボード上のピン配置を定義する
136 
137 #ifdef COMPILE_TKDNGPIO
138 const unsigned char GPIO_PINMAP[] =
139 {
140  _PORT2 , _BIT1, // Arduino-D0 : P21
141  _PORT2 , _BIT0, // Arduino-D1 : P20
142  _PORT2 , _BIT2, // Arduino-D2 : P22
143  _PORT2 , _BIT3, // Arduino-D3 : P23
144  _PORT2 , _BIT4, // Arduino-D4 : P24
145  _PORT2 , _BIT5, // Arduino-D5 : P25
146  _PORT3 , _BIT2, // Arduino-D6 : P32
147  _PORT3 , _BIT3, // Arduino-D7 : P33
148  _PORTC , _BIT2, // Arduino-D8 : PC2
149  _PORTC , _BIT3, // Arduino-D9 : PC3
150  _PORTC , _BIT4, // Arduino-D10 : PC4
151  _PORTC , _BIT6, // Arduino-D11 : PC6
152  _PORTC , _BIT7, // Arduino-D12 : PC7
153  _PORTC , _BIT5, // Arduino-D13 : PC5
154  _PORT4 , _BIT0, // Arduino-D14 : P40
155  _PORT4 , _BIT1, // Arduino-D15 : P41
156  _PORT4 , _BIT2, // Arduino-D16 : P42
157  _PORT4 , _BIT3, // Arduino-D17 : P43
158  _PORT4 , _BIT4, // Arduino-D18 : P44
159  _PORT4 , _BIT5, // Arduino-D19 : P45
160  _PORT4 , _BIT6, // 20 : P46
161  _PORT4 , _BIT7, // 21 : P47
162  _PORTC , _BIT0, // 22 : PC0
163  _PORTC , _BIT1, // 23 : PC1
164  _PORT5 , _BIT0, // 24 : P50
165  _PORT5 , _BIT1, // 25 : P51
166  _PORT5 , _BIT2, // 26 : P52
167  _PORT5 , _BIT3, // 27 : P53
168  _PORT5 , _BIT4, // 28 : P54
169  _PORT5 , _BIT5, // 29 : P55
170  _PORT1 , _BIT2, // 30 : P12
171  _PORT1 , _BIT3, // 31 : P13
172  _PORT1 , _BIT4, // 32 : P14
173  _PORT1 , _BIT5, // 33 : P15
174  _PORT1 , _BIT6, // 34 : P16
175  _PORT1 , _BIT7, // 35 : P17
176  _PORTD , _BIT0, // 36 : PD0
177  _PORTD , _BIT1, // 37 : PD1
178  _PORTD , _BIT2, // 38 : PD2
179  _PORTD , _BIT3, // 39 : PD3
180  _PORTD , _BIT4, // 40 : PD4
181  _PORTD , _BIT5, // 41 : PD5
182  _PORTD , _BIT6, // 42 : PD6
183  _PORTD , _BIT7, // 43 : PD7
184  _PORTE , _BIT0, // 44 : PE0
185  _PORTE , _BIT1, // 45 : PE1
186  _PORTE , _BIT2, // 46 : PE2
187  _PORTE , _BIT3, // 47 : PE3
188  _PORTE , _BIT4, // 48 : PE4
189  _PORTE , _BIT5, // 49 : PE5
190  _PORTE , _BIT6, // 50 : PE6
191  _PORTE , _BIT7, // 51 : PE7
192  _PORT0 , _BIT7, // 52 : P07
193  _PORT0 , _BIT5, // 53 : P05
194  _PORT3 , _BIT5, // 54 : P35/NMI
195 };
196 
197 const unsigned char SFP_PINMAP[] =
198 {
199  _PORT9 , _BIT0, // LED0
200  _PORT9 , _BIT1, // LED1
201  _PORT9 , _BIT2, // LED2
202  _PORT9 , _BIT3, // LED3
203  _PORT9 , _BIT3, // BUZZ
204  _PORTF , _BIT5, // SW
205  _PORTC , _BIT4, // SPI_CS0
206  _PORTC , _BIT0, // SPI_CS1
207  _PORTC , _BIT1, // SPI_CS2
208  _PORTC , _BIT2, // SPI_CS3
209 };
210 
211 #endif
特電HALのヘッダファイル