Skip to content

Commit edbac19

Browse files
committed
Remove unused pin parameter from rp2040Init()
1 parent 4e7659f commit edbac19

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Adafruit_NeoPixel.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ Adafruit_NeoPixel::Adafruit_NeoPixel(uint16_t n, int16_t p, neoPixelType t)
8484
setPin(p);
8585
#if defined(ARDUINO_ARCH_RP2040)
8686
#ifdef NEO_KHZ400
87-
rp2040Init(p, is800KHz);
87+
rp2040Init(is800KHz);
8888
#else
89-
rp2040Init(p, true);
89+
rp2040Init(true);
9090
#endif
9191
#endif
9292
}
@@ -215,11 +215,11 @@ void Adafruit_NeoPixel::rp2040PioProgramInit(uint8_t pin, bool is800KHz) {
215215
ws2812_program_init(pio, pio_sm, pio_program_offset, pin, 400000, 8);
216216
}
217217
}
218-
void Adafruit_NeoPixel::rp2040Init(uint8_t pin, bool is800KHz)
218+
void Adafruit_NeoPixel::rp2040Init(bool is800KHz)
219219
{
220220
// Find a PIO with enough available space in its instruction memory
221221
pio = pio0;
222-
if (!pio_can_add_program(this->pio, &ws2812_program)) {
222+
if (!pio_can_add_program(pio, &ws2812_program)) {
223223
pio = pio1;
224224
}
225225

@@ -238,9 +238,9 @@ void Adafruit_NeoPixel::rp2040Show(uint8_t pin, uint8_t *pixels, uint32_t numBy
238238
if (init)
239239
{
240240
// On first pass through initialise the PIO
241-
rp2040Init(pin, is800KHz);
241+
rp2040Init(is800KHz);
242242
}
243-
243+
244244
while(numBytes--)
245245
// Bits for transmission must be shifted to top 8 bits
246246
pio_sm_put_blocking(pio, pio_sm, ((uint32_t)*pixels++)<< 24);
@@ -3152,7 +3152,7 @@ void Adafruit_NeoPixel::setPin(int16_t p) {
31523152
#if defined(ARDUINO_ARCH_RP2040)
31533153
if (!init)
31543154
pio_sm_set_enabled(pio, pio_sm, false);
3155-
#endif
3155+
#endif
31563156
pinMode(pin, INPUT); // Disable existing out pin
31573157
}
31583158
pin = p;

Adafruit_NeoPixel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ class Adafruit_NeoPixel {
376376
private:
377377
#if defined(ARDUINO_ARCH_RP2040)
378378
void rp2040PioProgramInit(uint8_t pin, bool is800KHz);
379-
void rp2040Init(uint8_t pin, bool is800KHz);
379+
void rp2040Init(bool is800KHz);
380380
void rp2040Show(uint8_t pin, uint8_t *pixels, uint32_t numBytes, bool is800KHz);
381381
#endif
382382

0 commit comments

Comments
 (0)