Skip to content

Commit 656dca0

Browse files
committed
fixed up SPI / I2C pin interfaces. Added Serial2 support. Added pin definitions for RTS and CTS for Serial1 and Serial2
1 parent c1b7ec3 commit 656dca0

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

variants/particle_xenon/variant.h

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -140,21 +140,27 @@ static const uint8_t A5 = PIN_A5;
140140
/*
141141
* Serial interfaces
142142
*/
143-
#define PIN_SERIAL1_RX PIN_D9
144-
#define PIN_SERIAL1_TX PIN_D10
143+
#define PIN_SERIAL1_RX D9
144+
#define PIN_SERIAL1_TX D10
145+
#define PIN_SERIAL1_CTS D4
146+
#define PIN_SERIAL1_RTS D3
147+
#define PIN_SERIAL2_RX D5
148+
#define PIN_SERIAL2_TX D4
149+
#define PIN_SERIAL2_CTS D6
150+
#define PIN_SERIAL2_RTS D8
145151

146152
/*
147153
* SPI Interfaces
148154
*/
149155
#define SPI_INTERFACES_COUNT 2
150156

151-
#define PIN_SPI_SS PIN_A0
152-
#define PIN_SPI_MISO _PINNUM(1, 14)
153-
#define PIN_SPI_MOSI _PINNUM(1, 13)
154-
#define PIN_SPI_SCK _PINNUM(1, 15)
155-
#define PIN_SPI1_MISO _PINNUM(1, 8)
156-
#define PIN_SPI1_MOSI _PINNUM(1, 2)
157-
#define PIN_SPI1_SCK _PINNUM(1, 1)
157+
#define PIN_SPI_SS D14
158+
#define PIN_SPI_MISO D11
159+
#define PIN_SPI_MOSI D12
160+
#define PIN_SPI_SCK D13
161+
#define PIN_SPI1_MISO D4
162+
#define PIN_SPI1_MOSI D3
163+
#define PIN_SPI1_SCK D2
158164

159165
static const uint8_t SS = PIN_SPI_SS;
160166
static const uint8_t MOSI = PIN_SPI_MOSI;
@@ -169,10 +175,10 @@ static const uint8_t SCK1 = PIN_SPI1_SCK;
169175
*/
170176
#define WIRE_INTERFACES_COUNT 2
171177

172-
#define PIN_WIRE_SDA _PINNUM(0, 26)
173-
#define PIN_WIRE_SCL _PINNUM(0, 27)
174-
#define PIN_WIRE1_SDA _PINNUM(1, 1)
175-
#define PIN_WIRE1_SCL _PINNUM(1, 2)
178+
#define PIN_WIRE_SDA D0
179+
#define PIN_WIRE_SCL D1
180+
#define PIN_WIRE1_SDA D2
181+
#define PIN_WIRE1_SCL D3
176182

177183
// On-board QSPI Flash
178184
#define EXTERNAL_FLASH_DEVICES GD25Q16C

0 commit comments

Comments
 (0)