Skip to content

Commit

Permalink
Merge pull request #303 from facchinm/c33
Browse files Browse the repository at this point in the history
Support Arduino Portenta C33
  • Loading branch information
facchinm authored Jun 22, 2023
2 parents 55e7bb6 + 0ad2d7d commit 7e0c757
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/local/BLELocalDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,26 @@ int BLELocalDevice::begin()
// BT_REG_ON -> HIGH
pinMode(BT_REG_ON, OUTPUT);
digitalWrite(BT_REG_ON, HIGH);
#elif defined(ARDUINO_PORTENTA_C33)
#define NINA_GPIO0 (100)
#define NINA_RESETN (101)
pinMode(NINA_GPIO0, OUTPUT);
pinMode(NINA_RESETN, OUTPUT);
Serial5.begin(921600);

digitalWrite(NINA_GPIO0, HIGH);
delay(100);
digitalWrite(NINA_RESETN, HIGH);
digitalWrite(NINA_RESETN, LOW);
digitalWrite(NINA_RESETN, HIGH);
auto _start = millis();
while (millis() - _start < 500) {
if (Serial5.available()) {
Serial5.read();
}
}
//pinMode(94, OUTPUT);
//digitalWrite(94, LOW);
#endif


Expand Down
2 changes: 2 additions & 0 deletions src/utility/HCIUartTransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
// SerialHCI is already defined in the variant
#elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
#define SerialHCI Serial2
#elif defined(ARDUINO_PORTENTA_C33)
#define SerialHCI Serial5
#else
#error "Unsupported board selected!"
#endif
Expand Down

0 comments on commit 7e0c757

Please sign in to comment.