File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,10 @@ class _SLIPSerial: public Stream{
220220 void begin (unsigned long baudrate){
221221 serial->begin (baudrate);
222222 }
223+ // for bluetooth
224+ void begin (char *name){
225+ serial->begin (name);
226+ }
223227 // SLIP specific method which begins a transmitted packet
224228 void beginPacket () { serial->write (eot); }
225229
@@ -264,8 +268,25 @@ typedef decltype(Serial) actualUSBtype;
264268using SLIPEncodedUSBSerial = _SLIPSerial<actualUSBtype>;
265269template <> void _SLIPSerial<actualUSBtype>::endPacket(){
266270 serial->write (eot);
271+ #if defined(CORE_TEENSY)
267272 serial->send_now ();
273+ #endif
268274}
269275#endif
270276
277+ // Bluetooth Example
278+ // #include "BluetoothSerial.h"
279+ // #if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
280+ // BluetoothSerial bluetoothserialinstance;
281+ // SLIPEncodedBluetoothSerial SLIPSerial(bluetoothserialinstance);
282+ // #endif
283+
284+ #if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
285+ #include " BluetoothSerial.h"
286+ using SLIPEncodedBluetoothSerial = _SLIPSerial<BluetoothSerial>;
287+ template <> void _SLIPSerial<BluetoothSerial>::endPacket(){
288+ serial->write (eot);
289+
290+ }
291+ #endif
271292#endif
You can’t perform that action at this time.
0 commit comments