Skip to content

Commit

Permalink
Invert GPIO output to allow turning on LEDs via digitalWrite(LEDR,HIG…
Browse files Browse the repository at this point in the history
…H) instead of digitalWrite(LEDR,LOW). (#177)
  • Loading branch information
aentinger authored May 12, 2021
1 parent e8169b0 commit c8745e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utility/nano_rp2040_support.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ PinStatus digitalRead(NinaPin pin)

void digitalWrite(NinaPin pin, PinStatus value)
{
WiFiDrv::digitalWrite(static_cast<uint8_t>(pin), static_cast<uint8_t>(value));
if (value == LOW)
WiFiDrv::digitalWrite(static_cast<uint8_t>(pin), 1);
else
WiFiDrv::digitalWrite(static_cast<uint8_t>(pin), 0);
}

int analogRead(NinaPin pin)
Expand Down

0 comments on commit c8745e0

Please sign in to comment.