Skip to content

Commit

Permalink
Apply Apollo3 pin mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
csonsino committed Sep 16, 2019
1 parent 7e182a8 commit ab412b0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Adafruit_NeoPixel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ab412b0

Please sign in to comment.