Skip to content

Commit

Permalink
Add support for NICLA VISION
Browse files Browse the repository at this point in the history
  • Loading branch information
giulcioffi committed May 9, 2022
1 parent ad8b870 commit b39ac7e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/local/BLELocalDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
#ifndef BT_REG_ON
#define BT_REG_ON PJ_12
#endif
#elif defined(ARDUINO_NICLA_VISION)
#ifndef BT_REG_ON
#define BT_REG_ON PF_14
#endif
#endif

BLELocalDevice::BLELocalDevice()
Expand Down Expand Up @@ -61,7 +65,7 @@ int BLELocalDevice::begin()
delay(100);
digitalWrite(NINA_RESETN, HIGH);
delay(750);
#elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7)
#elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
// BT_REG_ON -> HIGH
pinMode(BT_REG_ON, OUTPUT);
digitalWrite(BT_REG_ON, HIGH);
Expand Down Expand Up @@ -134,8 +138,7 @@ void BLELocalDevice::end()
#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)
// BT_REG_ON -> LOW
#elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
digitalWrite(BT_REG_ON, LOW);
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion src/utility/HCIUartTransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// SerialHCI is already defined in the variant
#elif defined(ARDUINO_PORTENTA_H7_M4)
// SerialHCI is already defined in the variant
#elif defined(ARDUINO_PORTENTA_H7_M7)
#elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
#define SerialHCI Serial2
#else
#error "Unsupported board selected!"
Expand Down

0 comments on commit b39ac7e

Please sign in to comment.