Skip to content

Commit f1a8c8b

Browse files
committed
Update pin numbers according to recent changes
Signed-off-by: Thibaut VIARD <thibaut.viard@atmel.com>
1 parent ddc326e commit f1a8c8b

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

libraries/SPI/SPI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@ void SPIClass::detachInterrupt() {
9898
// Should be disableInterrupt()
9999
}
100100

101-
SPIClass SPI(&sercom4, 18, 20, 21);
101+
SPIClass SPI( &sercom4, PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI ) ;

variants/arduino_zero/variant.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -207,5 +207,5 @@ SERCOM sercom3( SERCOM3 ) ;
207207
SERCOM sercom4( SERCOM4 ) ;
208208
SERCOM sercom5( SERCOM5 ) ;
209209

210-
Uart Serial1( &sercom0, 0, 1 ) ;
211-
Uart Serial( &sercom5, 36, 35 ) ;
210+
Uart Serial1( &sercom0, PIN_SERIAL_RX, PIN_SERIAL_TX ) ;
211+
Uart Serial( &sercom5, PIN_SERIAL_RX, PIN_SERIAL_TX ) ;

variants/arduino_zero/variant.h

+13-2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,17 @@ static const uint8_t A4 = PIN_A4 ;
9494
static const uint8_t A5 = PIN_A5 ;
9595
#define ADC_RESOLUTION 12
9696

97+
/*
98+
* Serial interfaces
99+
*/
100+
// Serial (EDBG)
101+
#define PIN_SERIAL_RX (31ul)
102+
#define PIN_SERIAL_TX (30ul)
103+
104+
// Serial1
105+
#define PIN_SERIAL1_RX (0ul)
106+
#define PIN_SERIAL1_TX (1ul)
107+
97108
/*
98109
* SPI Interfaces
99110
*/
@@ -198,11 +209,11 @@ extern Uart Serial1;
198209
//
199210
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
200211
// pins are NOT connected to anything by default.
201-
#define SERIAL_PORT_MONITOR Serial
202212
#define SERIAL_PORT_USBVIRTUAL SerialUSB
203-
#define SERIAL_PORT_HARDWARE_OPEN Serial1
204213
#define SERIAL_PORT_HARDWARE Serial
205214
#define SERIAL_PORT_HARDWARE1 Serial1
215+
#define SERIAL_PORT_MONITOR SERIAL_PORT_HARDWARE
216+
#define SERIAL_PORT_HARDWARE_OPEN SERIAL_PORT_HARDWARE1
206217

207218
#endif /* _VARIANT_ARDUINO_ZERO_ */
208219

0 commit comments

Comments
 (0)