@@ -58,26 +58,7 @@ BLELocalDevice::~BLELocalDevice()
5858
5959int BLELocalDevice::begin ()
6060{
61- #if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT)
62- // reset the NINA in BLE mode
63- pinMode (SPIWIFI_SS, OUTPUT);
64- pinMode (NINA_RESETN, OUTPUT);
65-
66- digitalWrite (SPIWIFI_SS, LOW);
67- #endif
68-
69- #if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2)
70- digitalWrite (NINA_RESETN, HIGH);
71- delay (100 );
72- digitalWrite (NINA_RESETN, LOW);
73- delay (750 );
74- #elif defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT)
75- // inverted reset
76- digitalWrite (NINA_RESETN, LOW);
77- delay (100 );
78- digitalWrite (NINA_RESETN, HIGH);
79- delay (750 );
80- #elif defined(PORTENTA_H7_PINS) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) || defined(ARDUINO_GIGA) || defined(ARDUINO_OPTA)
61+ #if defined(PORTENTA_H7_PINS) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) || defined(ARDUINO_GIGA) || defined(ARDUINO_OPTA)
8162 // BT_REG_ON -> HIGH
8263 pinMode (BT_REG_ON, OUTPUT);
8364 digitalWrite (BT_REG_ON, LOW);
@@ -224,15 +205,9 @@ void BLELocalDevice::end()
224205
225206 HCI.end ();
226207
227- #if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2)
228- // disable the NINA
229- digitalWrite (NINA_RESETN, HIGH);
230- #elif defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT)
231- // disable the NINA
232- digitalWrite (NINA_RESETN, LOW);
233- #elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) || defined(ARDUINO_GIGA) || defined(ARDUINO_OPTA)
208+ #if defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) || defined(ARDUINO_GIGA) || defined(ARDUINO_OPTA)
234209 digitalWrite (BT_REG_ON, LOW);
235- #endif
210+ #endif
236211 _advertisingData.clear ();
237212 _scanResponseData.clear ();
238213}
0 commit comments