Skip to content

Commit

Permalink
use constant values for SPI / I2C pins
Browse files Browse the repository at this point in the history
  • Loading branch information
outlandnish committed Feb 8, 2020
1 parent 656dca0 commit d09c714
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions variants/particle_xenon/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,27 +140,27 @@ static const uint8_t A5 = PIN_A5;
/*
* Serial interfaces
*/
#define PIN_SERIAL1_RX D9
#define PIN_SERIAL1_TX D10
#define PIN_SERIAL1_CTS D4
#define PIN_SERIAL1_RTS D3
#define PIN_SERIAL2_RX D5
#define PIN_SERIAL2_TX D4
#define PIN_SERIAL2_CTS D6
#define PIN_SERIAL2_RTS D8
#define PIN_SERIAL1_RX 9
#define PIN_SERIAL1_TX 10
#define PIN_SERIAL1_CTS 4
#define PIN_SERIAL1_RTS 3
#define PIN_SERIAL2_RX 5
#define PIN_SERIAL2_TX 4
#define PIN_SERIAL2_CTS 6
#define PIN_SERIAL2_RTS 8

/*
* SPI Interfaces
*/
#define SPI_INTERFACES_COUNT 2

#define PIN_SPI_SS D14
#define PIN_SPI_MISO D11
#define PIN_SPI_MOSI D12
#define PIN_SPI_SCK D13
#define PIN_SPI1_MISO D4
#define PIN_SPI1_MOSI D3
#define PIN_SPI1_SCK D2
#define PIN_SPI_SS 14
#define PIN_SPI_MISO 11
#define PIN_SPI_MOSI 12
#define PIN_SPI_SCK 13
#define PIN_SPI1_MISO 4
#define PIN_SPI1_MOSI 3
#define PIN_SPI1_SCK 2

static const uint8_t SS = PIN_SPI_SS;
static const uint8_t MOSI = PIN_SPI_MOSI;
Expand All @@ -175,10 +175,10 @@ static const uint8_t SCK1 = PIN_SPI1_SCK;
*/
#define WIRE_INTERFACES_COUNT 2

#define PIN_WIRE_SDA D0
#define PIN_WIRE_SCL D1
#define PIN_WIRE1_SDA D2
#define PIN_WIRE1_SCL D3
#define PIN_WIRE_SDA 0
#define PIN_WIRE_SCL 1
#define PIN_WIRE1_SDA 2
#define PIN_WIRE1_SCL 3

// On-board QSPI Flash
#define EXTERNAL_FLASH_DEVICES GD25Q16C
Expand Down

0 comments on commit d09c714

Please sign in to comment.