From 57840811479dc7ebc080fd902d2b9a3076e2d12f Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Tue, 12 May 2020 01:16:30 +0300 Subject: [PATCH] disable BT Serial examples for S2 --- .../examples/SerialToSerialBT/SerialToSerialBT.ino | 7 ++++++- .../examples/SerialToSerialBTM/SerialToSerialBTM.ino | 6 ++++++ .../bt_remove_paired_devices/bt_remove_paired_devices.ino | 5 +++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/libraries/BluetoothSerial/examples/SerialToSerialBT/SerialToSerialBT.ino b/libraries/BluetoothSerial/examples/SerialToSerialBT/SerialToSerialBT.ino index 9a5fa087..6d09168d 100644 --- a/libraries/BluetoothSerial/examples/SerialToSerialBT/SerialToSerialBT.ino +++ b/libraries/BluetoothSerial/examples/SerialToSerialBT/SerialToSerialBT.ino @@ -3,6 +3,7 @@ // //This example creates a bridge between Serial and Classical Bluetooth (SPP) //and also demonstrate that SerialBT have the same functionalities of a normal Serial +#if CONFIG_IDF_TARGET_ESP32 #include "BluetoothSerial.h" @@ -26,4 +27,8 @@ void loop() { Serial.write(SerialBT.read()); } delay(20); -} \ No newline at end of file +} +#else +void setup() {} +void loop() {} +#endif diff --git a/libraries/BluetoothSerial/examples/SerialToSerialBTM/SerialToSerialBTM.ino b/libraries/BluetoothSerial/examples/SerialToSerialBTM/SerialToSerialBTM.ino index 3d17fb90..c2739e1a 100644 --- a/libraries/BluetoothSerial/examples/SerialToSerialBTM/SerialToSerialBTM.ino +++ b/libraries/BluetoothSerial/examples/SerialToSerialBTM/SerialToSerialBTM.ino @@ -5,6 +5,7 @@ //it creates a bridge between Serial and Classical Bluetooth (SPP) //this is an extention of the SerialToSerialBT example by Evandro Copercini - 2018 // +#if CONFIG_IDF_TARGET_ESP32 #include "BluetoothSerial.h" @@ -54,3 +55,8 @@ void loop() { } delay(20); } +#else +void setup() {} +void loop() {} +#endif + diff --git a/libraries/BluetoothSerial/examples/bt_remove_paired_devices/bt_remove_paired_devices.ino b/libraries/BluetoothSerial/examples/bt_remove_paired_devices/bt_remove_paired_devices.ino index c316a73b..4be1c1a8 100755 --- a/libraries/BluetoothSerial/examples/bt_remove_paired_devices/bt_remove_paired_devices.ino +++ b/libraries/BluetoothSerial/examples/bt_remove_paired_devices/bt_remove_paired_devices.ino @@ -10,6 +10,7 @@ //The only remedy is to delete this saved bound device from your device flash memory //and pair with the other device again. // +#if CONFIG_IDF_TARGET_ESP32 #include "esp_bt_main.h" #include "esp_bt_device.h" #include"esp_gap_bt_api.h" @@ -85,3 +86,7 @@ void setup() { } void loop() {} +#else +void setup() {} +void loop() {} +#endif