@@ -81,9 +81,9 @@ extern "C"
81
81
// #define digitalPinToTimer(P)
82
82
83
83
// LEDs
84
- #define PIN_LED_13 (13u )
85
- #define PIN_LED_RXL (75u )
86
- #define PIN_LED_TXL (76u )
84
+ #define PIN_LED_13 (13 )
85
+ #define PIN_LED_RXL (75 )
86
+ #define PIN_LED_TXL (76 )
87
87
#define PIN_LED PIN_LED_13
88
88
#define PIN_LED2 PIN_LED_RXL
89
89
#define PIN_LED3 PIN_LED_TXL
@@ -93,7 +93,7 @@ extern "C"
93
93
/*
94
94
* Analog pins
95
95
*/
96
- #define PIN_A0 (67ul )
96
+ #define PIN_A0 (67 )
97
97
#define PIN_A1 (PIN_A0 + 1)
98
98
#define PIN_A2 (PIN_A0 + 2)
99
99
#define PIN_A3 (PIN_A0 + 3)
@@ -102,7 +102,7 @@ extern "C"
102
102
#define PIN_A6 (PIN_A0 + 6)
103
103
#define PIN_A7 (PIN_A0 + 7)
104
104
105
- #define PIN_A8 (54ul )
105
+ #define PIN_A8 (54 )
106
106
#define PIN_A9 (PIN_A8 + 1)
107
107
#define PIN_A10 (PIN_A8 + 2)
108
108
#define PIN_A11 (PIN_A8 + 3)
@@ -120,8 +120,8 @@ static const uint8_t A2 = PIN_A2;
120
120
static const uint8_t A3 = PIN_A3 ;
121
121
static const uint8_t A4 = PIN_A4 ;
122
122
static const uint8_t A5 = PIN_A5 ;
123
- static const uint8_t A6 = PIN_A6 ;
124
- static const uint8_t A7 = PIN_A7 ;
123
+ static const uint8_t A6 = PIN_A6 ;
124
+ static const uint8_t A7 = PIN_A7 ;
125
125
126
126
static const uint8_t A8 = PIN_A8 ;
127
127
static const uint8_t A9 = PIN_A9 ;
@@ -138,36 +138,36 @@ static const uint8_t DAC1 = PIN_DAC1;
138
138
#define ADC_RESOLUTION 12
139
139
140
140
// Other pins
141
- #define PIN_ATN (39ul )
141
+ #define PIN_ATN (39 )
142
142
static const uint8_t ATN = PIN_ATN ;
143
143
144
144
/*
145
145
* Serial interfaces
146
146
*/
147
147
148
148
// Serial1
149
- #define PIN_SERIAL1_RX (0ul )
150
- #define PIN_SERIAL1_TX (1ul )
149
+ #define PIN_SERIAL1_RX (0 )
150
+ #define PIN_SERIAL1_TX (1 )
151
151
#define PAD_SERIAL1_TX (UART_TX_PAD_0)
152
152
#define PAD_SERIAL1_RX (SERCOM_RX_PAD_1)
153
153
154
154
// Serial2
155
- #define PIN_SERIAL2_RX (19ul )
156
- #define PIN_SERIAL2_TX (18ul )
155
+ #define PIN_SERIAL2_RX (19 )
156
+ #define PIN_SERIAL2_TX (18 )
157
157
#define PAD_SERIAL2_TX (UART_TX_PAD_0)
158
158
#define PAD_SERIAL2_RX (SERCOM_RX_PAD_1)
159
159
#define SERCOM_SERIAL2 sercom4
160
160
161
161
// Serial3
162
- #define PIN_SERIAL3_RX (17ul )
163
- #define PIN_SERIAL3_TX (16ul )
162
+ #define PIN_SERIAL3_RX (17 )
163
+ #define PIN_SERIAL3_TX (16 )
164
164
#define PAD_SERIAL3_TX (UART_TX_PAD_0)
165
165
#define PAD_SERIAL3_RX (SERCOM_RX_PAD_1)
166
166
#define SERCOM_SERIAL3 sercom1
167
167
168
168
// Serial4
169
- #define PIN_SERIAL4_RX (15ul )
170
- #define PIN_SERIAL4_TX (14ul )
169
+ #define PIN_SERIAL4_RX (15 )
170
+ #define PIN_SERIAL4_TX (14 )
171
171
#define PAD_SERIAL4_TX (UART_TX_PAD_0)
172
172
#define PAD_SERIAL4_RX (SERCOM_RX_PAD_1)
173
173
#define SERCOM_SERIAL4 sercom5
@@ -176,30 +176,30 @@ static const uint8_t ATN = PIN_ATN;
176
176
*/
177
177
#define SPI_INTERFACES_COUNT 2
178
178
179
- #define PIN_SPI_MISO (64u )
180
- #define PIN_SPI_MOSI (66u )
181
- #define PIN_SPI_SCK (65u )
179
+ #define PIN_SPI_MISO (64 )
180
+ #define PIN_SPI_MOSI (66 )
181
+ #define PIN_SPI_SCK (65 )
182
182
#define PERIPH_SPI sercom7
183
183
#define PAD_SPI_TX SPI_PAD_0_SCK_1
184
184
#define PAD_SPI_RX SERCOM_RX_PAD_3
185
185
186
- static const uint8_t SS = (53u ) ;
187
- static const uint8_t MOSI = PIN_SPI_MOSI ;
188
- static const uint8_t MISO = PIN_SPI_MISO ;
189
- static const uint8_t SCK = PIN_SPI_SCK ;
186
+ static const uint8_t SS = (53 ) ;
187
+ static const uint8_t MOSI = PIN_SPI_MOSI ;
188
+ static const uint8_t MISO = PIN_SPI_MISO ;
189
+ static const uint8_t SCK = PIN_SPI_SCK ;
190
190
191
- #define PIN_SPI1_MISO (80u )
192
- #define PIN_SPI1_MOSI (82u )
193
- #define PIN_SPI1_SCK (81u )
194
- #define PIN_SPI1_SS (83u )
191
+ #define PIN_SPI1_MISO (80 )
192
+ #define PIN_SPI1_MOSI (82 )
193
+ #define PIN_SPI1_SCK (81 )
194
+ #define PIN_SPI1_SS (83 )
195
195
#define PERIPH_SPI1 sercom2
196
196
#define PAD_SPI1_TX SPI_PAD_0_SCK_1
197
197
#define PAD_SPI1_RX SERCOM_RX_PAD_3
198
198
199
- static const uint8_t SS1 = PIN_SPI1_SS ;
200
- static const uint8_t MOSI1 = PIN_SPI1_MOSI ;
201
- static const uint8_t MISO1 = PIN_SPI1_MISO ;
202
- static const uint8_t SCK1 = PIN_SPI1_SCK ;
199
+ static const uint8_t SS1 = PIN_SPI1_SS ;
200
+ static const uint8_t MOSI1 = PIN_SPI1_MOSI ;
201
+ static const uint8_t MISO1 = PIN_SPI1_MISO ;
202
+ static const uint8_t SCK1 = PIN_SPI1_SCK ;
203
203
204
204
// Needed for SD library
205
205
#define SDCARD_SPI SPI1
@@ -213,16 +213,16 @@ static const uint8_t SCK1 = PIN_SPI1_SCK ;
213
213
*/
214
214
#define WIRE_INTERFACES_COUNT 2
215
215
216
- #define PIN_WIRE_SDA (62u )
217
- #define PIN_WIRE_SCL (63u )
216
+ #define PIN_WIRE_SDA (62 )
217
+ #define PIN_WIRE_SCL (63 )
218
218
#define PERIPH_WIRE sercom3
219
219
#define WIRE_IT_HANDLER SERCOM3_Handler
220
220
221
221
static const uint8_t SDA = PIN_WIRE_SDA ;
222
222
static const uint8_t SCL = PIN_WIRE_SCL ;
223
223
224
- #define PIN_WIRE1_SDA (25u )
225
- #define PIN_WIRE1_SCL (24u )
224
+ #define PIN_WIRE1_SDA (25 )
225
+ #define PIN_WIRE1_SCL (24 )
226
226
#define PERIPH_WIRE1 sercom6
227
227
#define WIRE1_IT_HANDLER SERCOM6_Handler
228
228
@@ -232,9 +232,9 @@ static const uint8_t SCL1 = PIN_WIRE1_SCL;
232
232
/*
233
233
* USB
234
234
*/
235
- #define PIN_USB_HOST_ENABLE (77ul )
236
- #define PIN_USB_DM (78ul )
237
- #define PIN_USB_DP (79ul )
235
+ #define PIN_USB_HOST_ENABLE (77 )
236
+ #define PIN_USB_DM (78 )
237
+ #define PIN_USB_DP (79 )
238
238
239
239
/*
240
240
* I2S Interfaces
@@ -244,39 +244,39 @@ static const uint8_t SCL1 = PIN_WIRE1_SCL;
244
244
#define I2S_DEVICE 0
245
245
#define I2S_CLOCK_GENERATOR 3
246
246
247
- #define PIN_I2S_SDO (32u )
248
- #define PIN_I2S_SDI (31u )
247
+ #define PIN_I2S_SDO (32 )
248
+ #define PIN_I2S_SDI (31 )
249
249
#define PIN_I2S_SCK PIN_SERIAL4_TX
250
- #define PIN_I2S_FS (33u )
250
+ #define PIN_I2S_FS (33 )
251
251
#define PIN_I2S_MCK PIN_SERIAL4_RX
252
252
253
253
//QSPI Pins
254
- #define PIN_QSPI_SCK (89u )
255
- #define PIN_QSPI_CS (90u )
256
- #define PIN_QSPI_IO0 (91u )
257
- #define PIN_QSPI_IO1 (92u )
258
- #define PIN_QSPI_IO2 (93u )
259
- #define PIN_QSPI_IO3 (94u )
254
+ #define PIN_QSPI_SCK (89 )
255
+ #define PIN_QSPI_CS (90 )
256
+ #define PIN_QSPI_IO0 (91 )
257
+ #define PIN_QSPI_IO1 (92 )
258
+ #define PIN_QSPI_IO2 (93 )
259
+ #define PIN_QSPI_IO3 (94 )
260
260
261
261
//PCC Pins
262
- #define PIN_PCC_DEN1 (26u )
263
- #define PIN_PCC_DEN2 (27u )
264
- #define PIN_PCC_CLK (28u )
265
- #define PIN_PCC_XCLK (29u )
266
- #define PIN_PCC_D0 (37u )
267
- #define PIN_PCC_D1 (36u )
268
- #define PIN_PCC_D2 (35u )
269
- #define PIN_PCC_D3 (34u )
270
- #define PIN_PCC_D4 (33u )
271
- #define PIN_PCC_D5 (32u )
272
- #define PIN_PCC_D6 (31u )
273
- #define PIN_PCC_D7 (30u )
274
- #define PIN_PCC_D8 (39u )
275
- #define PIN_PCC_D9 (38u )
276
- #define PIN_PCC_D10 (41u )
277
- #define PIN_PCC_D11 (40u )
278
- #define PIN_PCC_D12 (43u )
279
- #define PIN_PCC_D13 (42u )
262
+ #define PIN_PCC_DEN1 (26 )
263
+ #define PIN_PCC_DEN2 (27 )
264
+ #define PIN_PCC_CLK (28 )
265
+ #define PIN_PCC_XCLK (29 )
266
+ #define PIN_PCC_D0 (37 )
267
+ #define PIN_PCC_D1 (36 )
268
+ #define PIN_PCC_D2 (35 )
269
+ #define PIN_PCC_D3 (34 )
270
+ #define PIN_PCC_D4 (33 )
271
+ #define PIN_PCC_D5 (32 )
272
+ #define PIN_PCC_D6 (31 )
273
+ #define PIN_PCC_D7 (30 )
274
+ #define PIN_PCC_D8 (39 )
275
+ #define PIN_PCC_D9 (38 )
276
+ #define PIN_PCC_D10 (41 )
277
+ #define PIN_PCC_D11 (40 )
278
+ #define PIN_PCC_D12 (43 )
279
+ #define PIN_PCC_D13 (42 )
280
280
281
281
#if !defined(VARIANT_QSPI_BAUD_DEFAULT )
282
282
// TODO: meaningful value for this
@@ -332,4 +332,3 @@ extern Uart Serial1;
332
332
#define SERIAL_PORT_HARDWARE_OPEN Serial1
333
333
334
334
#endif /* _VARIANT_METRO_M4_ */
335
-
0 commit comments