@@ -50,26 +50,7 @@ BLELocalDevice::~BLELocalDevice()
50
50
51
51
int BLELocalDevice::begin ()
52
52
{
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)
73
54
// BT_REG_ON -> HIGH
74
55
pinMode (BT_REG_ON, OUTPUT);
75
56
digitalWrite (BT_REG_ON, LOW);
@@ -216,15 +197,9 @@ void BLELocalDevice::end()
216
197
217
198
HCI.end ();
218
199
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)
226
201
digitalWrite (BT_REG_ON, LOW);
227
- #endif
202
+ #endif
228
203
_advertisingData.clear ();
229
204
_scanResponseData.clear ();
230
205
}
0 commit comments