Skip to content

Commit e2b15c8

Browse files
committed
Changed pins definition in variants from constants to #defines.
1 parent c5880c2 commit e2b15c8

File tree

1 file changed

+25
-25
lines changed
  • hardware/arduino/sam/variants/arduino_due_x

1 file changed

+25
-25
lines changed

hardware/arduino/sam/variants/arduino_due_x/variant.h

+25-25
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ extern "C"{
101101
(x==BOARD_SPI_SS1 ? 1 : \
102102
(x==BOARD_SPI_SS2 ? 2 : 3)))
103103

104-
static const uint8_t SS = BOARD_SPI_SS0;
105-
static const uint8_t SS1 = BOARD_SPI_SS1;
106-
static const uint8_t SS2 = BOARD_SPI_SS2;
107-
static const uint8_t SS3 = BOARD_SPI_SS3;
108-
static const uint8_t MOSI = PIN_SPI_MOSI;
109-
static const uint8_t MISO = PIN_SPI_MISO;
110-
static const uint8_t SCK = PIN_SPI_SCK;
104+
#define SS BOARD_SPI_SS0
105+
#define SS1 BOARD_SPI_SS1
106+
#define SS2 BOARD_SPI_SS2
107+
#define SS3 BOARD_SPI_SS3
108+
#define MOSI PIN_SPI_MOSI
109+
#define MISO PIN_SPI_MISO
110+
#define SCK PIN_SPI_SCK
111111

112112
/*
113113
* Wire Interfaces
@@ -146,29 +146,29 @@ static const uint8_t SCK = PIN_SPI_SCK;
146146
/*
147147
* Analog pins
148148
*/
149-
static const uint8_t A0 = 54;
150-
static const uint8_t A1 = 55;
151-
static const uint8_t A2 = 56;
152-
static const uint8_t A3 = 57;
153-
static const uint8_t A4 = 58;
154-
static const uint8_t A5 = 59;
155-
static const uint8_t A6 = 60;
156-
static const uint8_t A7 = 61;
157-
static const uint8_t A8 = 62;
158-
static const uint8_t A9 = 63;
159-
static const uint8_t A10 = 64;
160-
static const uint8_t A11 = 65;
161-
static const uint8_t DAC0 = 66;
162-
static const uint8_t DAC1 = 67;
163-
static const uint8_t CANRX = 68;
164-
static const uint8_t CANTX = 69;
149+
#define A0 54
150+
#define A1 55
151+
#define A2 56
152+
#define A3 57
153+
#define A4 58
154+
#define A5 59
155+
#define A6 60
156+
#define A7 61
157+
#define A8 62
158+
#define A9 63
159+
#define A10 64
160+
#define A11 65
161+
#define DAC0 66
162+
#define DAC1 67
163+
#define CANRX 68
164+
#define CANTX 69
165165
#define ADC_RESOLUTION 12
166166

167167
/*
168168
* Complementary CAN pins
169169
*/
170-
static const uint8_t CAN1RX = 88;
171-
static const uint8_t CAN1TX = 89;
170+
#define CAN1RX 88
171+
#define CAN1TX 89
172172

173173
// CAN0
174174
#define PINS_CAN0 (90u)

0 commit comments

Comments
 (0)