Skip to content

Commit b39ac7e

Browse files
committed
Add support for NICLA VISION
1 parent ad8b870 commit b39ac7e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Diff for: src/local/BLELocalDevice.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
#ifndef BT_REG_ON
3030
#define BT_REG_ON PJ_12
3131
#endif
32+
#elif defined(ARDUINO_NICLA_VISION)
33+
#ifndef BT_REG_ON
34+
#define BT_REG_ON PF_14
35+
#endif
3236
#endif
3337

3438
BLELocalDevice::BLELocalDevice()
@@ -61,7 +65,7 @@ int BLELocalDevice::begin()
6165
delay(100);
6266
digitalWrite(NINA_RESETN, HIGH);
6367
delay(750);
64-
#elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7)
68+
#elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
6569
// BT_REG_ON -> HIGH
6670
pinMode(BT_REG_ON, OUTPUT);
6771
digitalWrite(BT_REG_ON, HIGH);
@@ -134,8 +138,7 @@ void BLELocalDevice::end()
134138
#elif defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT)
135139
// disable the NINA
136140
digitalWrite(NINA_RESETN, LOW);
137-
#elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7)
138-
// BT_REG_ON -> LOW
141+
#elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
139142
digitalWrite(BT_REG_ON, LOW);
140143
#endif
141144
}

Diff for: src/utility/HCIUartTransport.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// SerialHCI is already defined in the variant
2828
#elif defined(ARDUINO_PORTENTA_H7_M4)
2929
// SerialHCI is already defined in the variant
30-
#elif defined(ARDUINO_PORTENTA_H7_M7)
30+
#elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
3131
#define SerialHCI Serial2
3232
#else
3333
#error "Unsupported board selected!"

0 commit comments

Comments
 (0)