Skip to content

Commit

Permalink
Add Serial3 for Arduino Nano Connect RP2040. Fix #807 (#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
khoih-prog authored Sep 6, 2022
1 parent 85d39cf commit 1303ef5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cores/rp2040/SerialPIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,3 +370,8 @@ size_t SerialPIO::write(uint8_t c) {
SerialPIO::operator bool() {
return _running;
}

#ifdef ARDUINO_NANO_RP2040_CONNECT
// NINA updates
SerialPIO Serial3(SERIAL3_TX, SERIAL3_RX);
#endif
5 changes: 5 additions & 0 deletions cores/rp2040/SerialPIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,8 @@ class SerialPIO : public HardwareSerial {
uint32_t _reader;
uint8_t *_queue;
};

#ifdef ARDUINO_NANO_RP2040_CONNECT
// NINA updates
extern SerialPIO Serial3;
#endif
3 changes: 3 additions & 0 deletions variants/arduino_nano_connect/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ static const uint8_t SCK = PIN_SPI0_SCK;
#define SerialNina Serial3
#define SerialHCI Serial2

#define SERIAL3_TX (D25)
#define SERIAL3_RX (D26)

//#define NINA_GPIOIRQ (21u) // LEDG pin (GPIO26 on NINA)
#define NINA_GPIO0 (D20) // (2u), real GPIO0 on NINA

Expand Down

0 comments on commit 1303ef5

Please sign in to comment.