From ab412b0d748f5f1918a9957b4c76b0651fa521e3 Mon Sep 17 00:00:00 2001 From: csonsino Date: Mon, 16 Sep 2019 09:38:19 -0600 Subject: [PATCH] Apply Apollo3 pin mapping --- Adafruit_NeoPixel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Adafruit_NeoPixel.cpp b/Adafruit_NeoPixel.cpp index c4f7d30a..e2349842 100644 --- a/Adafruit_NeoPixel.cpp +++ b/Adafruit_NeoPixel.cpp @@ -2169,14 +2169,17 @@ void Adafruit_NeoPixel::show(void) { void Adafruit_NeoPixel::setPin(uint16_t p) { if(begun && (pin >= 0)) { #if defined(AM_PART_APOLLO3) + // The pin has already been mapped to the Apollo3 pad apollo3UnsetPin(pin); #endif pinMode(pin, INPUT); } - pin = p; #if defined(AM_PART_APOLLO3) - apollo3SetPin(pin); + // Map the specified pin to the Apollo3 pad + p = ap3_gpio_pin2pad(p); + apollo3SetPin(p); #endif + pin = p; if(begun) { pinMode(p, OUTPUT); digitalWrite(p, LOW);