@@ -81,9 +81,9 @@ extern "C"
8181// #define digitalPinToTimer(P)
8282
8383// 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 )
8787#define PIN_LED PIN_LED_13
8888#define PIN_LED2 PIN_LED_RXL
8989#define PIN_LED3 PIN_LED_TXL
@@ -93,7 +93,7 @@ extern "C"
9393/*
9494 * Analog pins
9595 */
96- #define PIN_A0 (67ul )
96+ #define PIN_A0 (67 )
9797#define PIN_A1 (PIN_A0 + 1)
9898#define PIN_A2 (PIN_A0 + 2)
9999#define PIN_A3 (PIN_A0 + 3)
@@ -102,7 +102,7 @@ extern "C"
102102#define PIN_A6 (PIN_A0 + 6)
103103#define PIN_A7 (PIN_A0 + 7)
104104
105- #define PIN_A8 (54ul )
105+ #define PIN_A8 (54 )
106106#define PIN_A9 (PIN_A8 + 1)
107107#define PIN_A10 (PIN_A8 + 2)
108108#define PIN_A11 (PIN_A8 + 3)
@@ -120,8 +120,8 @@ static const uint8_t A2 = PIN_A2;
120120static const uint8_t A3 = PIN_A3 ;
121121static const uint8_t A4 = PIN_A4 ;
122122static 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 ;
125125
126126static const uint8_t A8 = PIN_A8 ;
127127static const uint8_t A9 = PIN_A9 ;
@@ -138,36 +138,36 @@ static const uint8_t DAC1 = PIN_DAC1;
138138#define ADC_RESOLUTION 12
139139
140140// Other pins
141- #define PIN_ATN (39ul )
141+ #define PIN_ATN (39 )
142142static const uint8_t ATN = PIN_ATN ;
143143
144144/*
145145 * Serial interfaces
146146 */
147147
148148// 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 )
151151#define PAD_SERIAL1_TX (UART_TX_PAD_0)
152152#define PAD_SERIAL1_RX (SERCOM_RX_PAD_1)
153153
154154// 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 )
157157#define PAD_SERIAL2_TX (UART_TX_PAD_0)
158158#define PAD_SERIAL2_RX (SERCOM_RX_PAD_1)
159159#define SERCOM_SERIAL2 sercom4
160160
161161// 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 )
164164#define PAD_SERIAL3_TX (UART_TX_PAD_0)
165165#define PAD_SERIAL3_RX (SERCOM_RX_PAD_1)
166166#define SERCOM_SERIAL3 sercom1
167167
168168// 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 )
171171#define PAD_SERIAL4_TX (UART_TX_PAD_0)
172172#define PAD_SERIAL4_RX (SERCOM_RX_PAD_1)
173173#define SERCOM_SERIAL4 sercom5
@@ -176,30 +176,30 @@ static const uint8_t ATN = PIN_ATN;
176176 */
177177#define SPI_INTERFACES_COUNT 2
178178
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 )
182182#define PERIPH_SPI sercom7
183183#define PAD_SPI_TX SPI_PAD_0_SCK_1
184184#define PAD_SPI_RX SERCOM_RX_PAD_3
185185
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 ;
190190
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 )
195195#define PERIPH_SPI1 sercom2
196196#define PAD_SPI1_TX SPI_PAD_0_SCK_1
197197#define PAD_SPI1_RX SERCOM_RX_PAD_3
198198
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 ;
203203
204204// Needed for SD library
205205#define SDCARD_SPI SPI1
@@ -213,16 +213,16 @@ static const uint8_t SCK1 = PIN_SPI1_SCK ;
213213 */
214214#define WIRE_INTERFACES_COUNT 2
215215
216- #define PIN_WIRE_SDA (62u )
217- #define PIN_WIRE_SCL (63u )
216+ #define PIN_WIRE_SDA (62 )
217+ #define PIN_WIRE_SCL (63 )
218218#define PERIPH_WIRE sercom3
219219#define WIRE_IT_HANDLER SERCOM3_Handler
220220
221221static const uint8_t SDA = PIN_WIRE_SDA ;
222222static const uint8_t SCL = PIN_WIRE_SCL ;
223223
224- #define PIN_WIRE1_SDA (25u )
225- #define PIN_WIRE1_SCL (24u )
224+ #define PIN_WIRE1_SDA (25 )
225+ #define PIN_WIRE1_SCL (24 )
226226#define PERIPH_WIRE1 sercom6
227227#define WIRE1_IT_HANDLER SERCOM6_Handler
228228
@@ -232,9 +232,9 @@ static const uint8_t SCL1 = PIN_WIRE1_SCL;
232232/*
233233 * USB
234234 */
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 )
238238
239239/*
240240 * I2S Interfaces
@@ -244,39 +244,39 @@ static const uint8_t SCL1 = PIN_WIRE1_SCL;
244244#define I2S_DEVICE 0
245245#define I2S_CLOCK_GENERATOR 3
246246
247- #define PIN_I2S_SDO (32u )
248- #define PIN_I2S_SDI (31u )
247+ #define PIN_I2S_SDO (32 )
248+ #define PIN_I2S_SDI (31 )
249249#define PIN_I2S_SCK PIN_SERIAL4_TX
250- #define PIN_I2S_FS (33u )
250+ #define PIN_I2S_FS (33 )
251251#define PIN_I2S_MCK PIN_SERIAL4_RX
252252
253253//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 )
260260
261261//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 )
280280
281281#if !defined(VARIANT_QSPI_BAUD_DEFAULT )
282282 // TODO: meaningful value for this
@@ -332,4 +332,3 @@ extern Uart Serial1;
332332#define SERIAL_PORT_HARDWARE_OPEN Serial1
333333
334334#endif /* _VARIANT_METRO_M4_ */
335-
0 commit comments