Skip to content

Commit

Permalink
Support Nano RP2040 Connect
Browse files Browse the repository at this point in the history
  • Loading branch information
facchinm committed Mar 1, 2021
1 parent 4c149a2 commit 618fd8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/local/BLELocalDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ BLELocalDevice::~BLELocalDevice()

int BLELocalDevice::begin()
{
#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_SAMD_NANO_33_IOT)
#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT)
// reset the NINA in BLE mode
pinMode(SPIWIFI_SS, OUTPUT);
pinMode(NINA_RESETN, OUTPUT);
Expand All @@ -55,7 +55,7 @@ int BLELocalDevice::begin()
delay(100);
digitalWrite(NINA_RESETN, LOW);
delay(750);
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
#elif defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT)
// inverted reset
digitalWrite(NINA_RESETN, LOW);
delay(100);
Expand Down Expand Up @@ -131,7 +131,7 @@ void BLELocalDevice::end()
#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2)
// disable the NINA
digitalWrite(NINA_RESETN, HIGH);
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
#elif defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT)
// disable the NINA
digitalWrite(NINA_RESETN, LOW);
#elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7)
Expand Down
4 changes: 2 additions & 2 deletions src/utility/HCIUartTransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2)
#define SerialHCI Serial2
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
#elif defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT)
// SerialHCI is already defined in the variant
#elif defined(ARDUINO_PORTENTA_H7_M4)
// SerialHCI is already defined in the variant
Expand Down Expand Up @@ -93,7 +93,7 @@ size_t HCIUartTransportClass::write(const uint8_t* data, size_t length)
return result;
}

#ifdef ARDUINO_AVR_UNO_WIFI_REV2
#if defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_NANO_RP2040_CONNECT)
HCIUartTransportClass HCIUartTransport(SerialHCI, 119600);
#else
HCIUartTransportClass HCIUartTransport(SerialHCI, 912600);
Expand Down

0 comments on commit 618fd8e

Please sign in to comment.