mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* minor refactor for RAK_4631 SerialInterface
This commit is contained in:
parent
06c666843e
commit
27aa7a7bb0
2 changed files with 6 additions and 4 deletions
|
|
@ -1399,9 +1399,6 @@ void setup() {
|
||||||
sprintf(dev_name, "%s%s", BLE_NAME_PREFIX, the_mesh.getNodeName());
|
sprintf(dev_name, "%s%s", BLE_NAME_PREFIX, the_mesh.getNodeName());
|
||||||
serial_interface.begin(dev_name, the_mesh.getBLEPin());
|
serial_interface.begin(dev_name, the_mesh.getBLEPin());
|
||||||
#else
|
#else
|
||||||
#ifdef RAK_4631
|
|
||||||
pinMode(WB_IO2, OUTPUT);
|
|
||||||
#endif
|
|
||||||
serial_interface.begin(Serial);
|
serial_interface.begin(Serial);
|
||||||
#endif
|
#endif
|
||||||
the_mesh.startInterface(serial_interface);
|
the_mesh.startInterface(serial_interface);
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,12 @@ public:
|
||||||
#ifdef LILYGO_T3S3
|
#ifdef LILYGO_T3S3
|
||||||
void begin(HWCDC& serial) { _serial = &serial; }
|
void begin(HWCDC& serial) { _serial = &serial; }
|
||||||
#elif defined(NRF52_PLATFORM)
|
#elif defined(NRF52_PLATFORM)
|
||||||
void begin(Adafruit_USBD_CDC& serial) { _serial = &serial; }
|
void begin(Adafruit_USBD_CDC& serial) {
|
||||||
|
_serial = &serial;
|
||||||
|
#ifdef RAK_4631
|
||||||
|
pinMode(WB_IO2, OUTPUT);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
void begin(HardwareSerial& serial) { _serial = &serial; }
|
void begin(HardwareSerial& serial) { _serial = &serial; }
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue