Skip to content

Commit 968a9d5

Browse files
committed
move chip reset from lib to core
1 parent 0c4d223 commit 968a9d5

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/local/BLELocalDevice.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
#undef ARDUINO_UNO_Q
3535
#endif
3636

37+
#if defined(ARDUINO_PORTENTA_C33)
38+
#include <EspChipManager.h>
39+
#endif
40+
3741
#if defined(PORTENTA_H7_PINS) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA)
3842
#ifndef BT_REG_ON
3943
#define BT_REG_ON PJ_12
@@ -86,17 +90,9 @@ int BLELocalDevice::begin()
8690
digitalWrite(BT_REG_ON, HIGH);
8791
delay(500);
8892
#elif defined(ARDUINO_PORTENTA_C33)
89-
#define NINA_GPIO0 (100)
90-
#define NINA_RESETN (101)
91-
pinMode(NINA_GPIO0, OUTPUT);
92-
pinMode(NINA_RESETN, OUTPUT);
93-
Serial5.begin(921600);
9493

95-
digitalWrite(NINA_GPIO0, HIGH);
96-
delay(100);
97-
digitalWrite(NINA_RESETN, HIGH);
98-
digitalWrite(NINA_RESETN, LOW);
99-
digitalWrite(NINA_RESETN, HIGH);
94+
Serial5.begin(921600);
95+
CEspChipManager::getInstance().initialize();
10096
auto _start = millis();
10197
while (millis() - _start < 500) {
10298
if (Serial5.available()) {

0 commit comments

Comments
 (0)