@@ -63,26 +63,7 @@ BLELocalDevice::~BLELocalDevice()
6363
6464int BLELocalDevice::begin ()
6565{
66- #if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT)
67- // reset the NINA in BLE mode
68- pinMode (SPIWIFI_SS, OUTPUT);
69- pinMode (NINA_RESETN, OUTPUT);
70-
71- digitalWrite (SPIWIFI_SS, LOW);
72- #endif
73-
74- #if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2)
75- digitalWrite (NINA_RESETN, HIGH);
76- delay (100 );
77- digitalWrite (NINA_RESETN, LOW);
78- delay (750 );
79- #elif defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT)
80- // inverted reset
81- digitalWrite (NINA_RESETN, LOW);
82- delay (100 );
83- digitalWrite (NINA_RESETN, HIGH);
84- delay (750 );
85- #elif defined(PORTENTA_H7_PINS) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) || defined(ARDUINO_GIGA) || defined(ARDUINO_OPTA)
66+ #if defined(PORTENTA_H7_PINS) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) || defined(ARDUINO_GIGA) || defined(ARDUINO_OPTA)
8667 // BT_REG_ON -> HIGH
8768 pinMode (BT_REG_ON, OUTPUT);
8869 digitalWrite (BT_REG_ON, LOW);
@@ -221,15 +202,9 @@ void BLELocalDevice::end()
221202
222203 HCI.end ();
223204
224- #if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2)
225- // disable the NINA
226- digitalWrite (NINA_RESETN, HIGH);
227- #elif defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT)
228- // disable the NINA
229- digitalWrite (NINA_RESETN, LOW);
230- #elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) || defined(ARDUINO_GIGA) || defined(ARDUINO_OPTA)
205+ #if defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) || defined(ARDUINO_GIGA) || defined(ARDUINO_OPTA)
231206 digitalWrite (BT_REG_ON, LOW);
232- #endif
207+ #endif
233208 _advertisingData.clear ();
234209 _scanResponseData.clear ();
235210}
0 commit comments