@@ -228,7 +228,9 @@ class _SLIPSerial: public Stream{
228228 void beginPacket () { serial->write (eot); }
229229
230230 // signify the end of the packet with an EOT
231- void endPacket ();
231+ void endPacket (){
232+ serial->write (eot);
233+ }
232234
233235 void flush (){
234236 serial->flush ();
@@ -237,10 +239,10 @@ class _SLIPSerial: public Stream{
237239};
238240
239241using SLIPEncodedSerial = _SLIPSerial<HardwareSerial> ;
240- template <> void _SLIPSerial<HardwareSerial>::endPacket(){
241- serial->write (eot);
242+ // template <> void _SLIPSerial<HardwareSerial>::endPacket(){
243+ // serial->write(eot);
242244
243- }
245+ // }
244246
245247#ifdef BOARD_HAS_USB_SERIAL
246248
@@ -264,29 +266,27 @@ typedef decltype(SerialUSB) actualUSBtype;
264266#define thisBoardsSerialUSB Serial
265267typedef decltype (Serial) actualUSBtype;
266268#endif
267-
268269using SLIPEncodedUSBSerial = _SLIPSerial<actualUSBtype>;
270+ #if defined(CORE_TEENSY)
269271template <> void _SLIPSerial<actualUSBtype>::endPacket(){
270272 serial->write (eot);
271- #if defined(CORE_TEENSY)
272273 serial->send_now ();
273- #endif
274274}
275275#endif
276276
277+ #endif
278+
277279// Bluetooth Example
280+
281+ // #if BOARD_HAS_BLUETOOTH_SERIAL
278282// #include "BluetoothSerial.h"
279- // #if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
280283// BluetoothSerial bluetoothserialinstance;
281284// SLIPEncodedBluetoothSerial SLIPSerial(bluetoothserialinstance);
282- // #endif
283285
284- #if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
286+ #if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3) && !defined(CONFIG_IDF_TARGET_ESP32S2)
285287#include " BluetoothSerial.h"
286288using SLIPEncodedBluetoothSerial = _SLIPSerial<BluetoothSerial>;
287- template <> void _SLIPSerial<BluetoothSerial>::endPacket(){
288- serial->write (eot);
289+ #define BOARD_HAS_BLUETOOTH_SERIAL
289290
290- }
291291#endif
292292#endif
0 commit comments