Skip to content

Commit b16a801

Browse files
committed
updated for neopixel to be on #40 like the silkscreen
1 parent 040bda6 commit b16a801

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

variants/metro_m4/variant.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,22 @@ const PinDescription g_APinDescription[]=
9292
// 35 - Secondary SPI cs
9393
{ PORTA, 16, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_0 }, //same as d10
9494

95-
// 36 - Internal NeoPixel
96-
{ PORTB, 22, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_6 }, // used as output only
97-
98-
// 37 (AREF)
95+
// 36 (AREF)
9996
{ PORTA, 3, PIO_ANALOG, PIN_ATTR_ANALOG, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_3 }, // DAC/VREFP
10097

10198
// ----------------------
102-
// 38 - 39 Alternate use of A0 and A1 (DAC output)
99+
// 37 - 38 Alternate use of A0 and A1 (DAC output)
103100
{ PORTA, 2, PIO_ANALOG, PIN_ATTR_ANALOG, DAC_Channel0, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_2 }, // DAC/VOUT[0]
104101
{ PORTA, 5, PIO_ANALOG, PIN_ATTR_ANALOG, DAC_Channel1, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_5 }, // DAC/VOUT[1]
105102

103+
// 39 - LED #13 duplicate placeholder
104+
{ PORTA, 16, PIO_TIMER_ALT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), No_ADC_Channel, PWM1_CH0, NOT_ON_TIMER, EXTERNAL_INT_0 },
105+
106+
// 40 - Internal NeoPixel
107+
{ PORTB, 22, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_6 }, // used as output only
108+
106109
// ----------------------
107-
// 40 - 45 QSPI (SCK, CS, IO0, IO1, IO2, IO3)
110+
// 41 - 46 QSPI (SCK, CS, IO0, IO1, IO2, IO3)
108111
{ PORTB, 10, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_10 },
109112
{ PORTB, 11, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_11 },
110113
{ PORTA, 8, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NMI },

variants/metro_m4/variant.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ extern "C"
100100
#define PIN_A5 (PIN_A0 + 5)
101101
#define PIN_A6 (PIN_A0 + 6)
102102
#define PIN_A7 (PIN_A0 + 7)
103-
#define PIN_DAC0 (14ul)
103+
#define PIN_DAC0 PIN_A0
104104
#define PIN_DAC1 PIN_A1
105105

106106
static const uint8_t A0 = PIN_A0;
@@ -118,7 +118,7 @@ static const uint8_t DAC1 = PIN_DAC1;
118118
#define ADC_RESOLUTION 12
119119

120120
// Other pins
121-
#define PIN_ATN (38ul)
121+
#define PIN_ATN (39ul)
122122
static const uint8_t ATN = PIN_ATN;
123123

124124
/*
@@ -196,12 +196,12 @@ static const uint8_t SCL = PIN_WIRE_SCL;
196196
#define PIN_I2S_MCK (2u)
197197

198198
//QSPI Pins
199-
#define PIN_QSPI_SCK (40u)
200-
#define PIN_QSPI_CS (41u)
201-
#define PIN_QSPI_IO0 (42u)
202-
#define PIN_QSPI_IO1 (43u)
203-
#define PIN_QSPI_IO2 (44u)
204-
#define PIN_QSPI_IO3 (45u)
199+
#define PIN_QSPI_SCK (41u)
200+
#define PIN_QSPI_CS (42u)
201+
#define PIN_QSPI_IO0 (43u)
202+
#define PIN_QSPI_IO1 (44u)
203+
#define PIN_QSPI_IO2 (45u)
204+
#define PIN_QSPI_IO3 (46u)
205205

206206
//PCC Pins
207207
#define PIN_PCC_DEN1 (PIN_SPI_MOSI)

0 commit comments

Comments
 (0)