@@ -50,26 +50,7 @@ BLELocalDevice::~BLELocalDevice()
5050
5151int BLELocalDevice::begin ()
5252{
53- #if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT)
54- // reset the NINA in BLE mode
55- pinMode (SPIWIFI_SS, OUTPUT);
56- pinMode (NINA_RESETN, OUTPUT);
57-
58- digitalWrite (SPIWIFI_SS, LOW);
59- #endif
60-
61- #if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2)
62- digitalWrite (NINA_RESETN, HIGH);
63- delay (100 );
64- digitalWrite (NINA_RESETN, LOW);
65- delay (750 );
66- #elif defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT)
67- // inverted reset
68- digitalWrite (NINA_RESETN, LOW);
69- delay (100 );
70- digitalWrite (NINA_RESETN, HIGH);
71- delay (750 );
72- #elif defined(PORTENTA_H7_PINS) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) || defined(ARDUINO_GIGA) || defined(ARDUINO_OPTA)
53+ #if defined(PORTENTA_H7_PINS) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) || defined(ARDUINO_GIGA) || defined(ARDUINO_OPTA)
7354 // BT_REG_ON -> HIGH
7455 pinMode (BT_REG_ON, OUTPUT);
7556 digitalWrite (BT_REG_ON, LOW);
@@ -216,15 +197,9 @@ void BLELocalDevice::end()
216197
217198 HCI.end ();
218199
219- #if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2)
220- // disable the NINA
221- digitalWrite (NINA_RESETN, HIGH);
222- #elif defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT)
223- // disable the NINA
224- digitalWrite (NINA_RESETN, LOW);
225- #elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) || defined(ARDUINO_GIGA) || defined(ARDUINO_OPTA)
200+ #if defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) || defined(ARDUINO_GIGA) || defined(ARDUINO_OPTA)
226201 digitalWrite (BT_REG_ON, LOW);
227- #endif
202+ #endif
228203 _advertisingData.clear ();
229204 _scanResponseData.clear ();
230205}
0 commit comments