forked from espressif/arduino-esp32
Some CDC and BTSerial compatibility fixes
This commit is contained in:
@ -477,7 +477,7 @@ static bool _init_bt(const char *deviceName)
|
||||
}
|
||||
|
||||
if(!_spp_task_handle){
|
||||
xTaskCreatePinnedToCore(_spp_tx_task, "spp_tx", 4096, NULL, 2, &_spp_task_handle, 0);
|
||||
xTaskCreatePinnedToCore(_spp_tx_task, "spp_tx", 4096, NULL, 10, &_spp_task_handle, 0);
|
||||
if(!_spp_task_handle){
|
||||
log_e("Network Event Task Start Failed!");
|
||||
return false;
|
||||
@ -815,4 +815,9 @@ bool BluetoothSerial::isReady(bool checkMaster, int timeout) {
|
||||
TickType_t xTicksToWait = timeout / portTICK_PERIOD_MS;
|
||||
return (xEventGroupWaitBits(_spp_event_group, SPP_RUNNING, pdFALSE, pdTRUE, xTicksToWait) & SPP_RUNNING) != 0;
|
||||
}
|
||||
|
||||
BluetoothSerial::operator bool() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
@ -34,6 +34,9 @@ class BluetoothSerial: public Stream
|
||||
~BluetoothSerial(void);
|
||||
|
||||
bool begin(String localName=String(), bool isMaster=false);
|
||||
bool begin(unsigned long baud){//compatibility
|
||||
return begin();
|
||||
}
|
||||
int available(void);
|
||||
int peek(void);
|
||||
bool hasClient(void);
|
||||
@ -54,7 +57,8 @@ class BluetoothSerial: public Stream
|
||||
bool isReady(bool checkMaster=false, int timeout=0);
|
||||
bool disconnect();
|
||||
bool unpairDevice(uint8_t remoteAddress[]);
|
||||
|
||||
|
||||
operator bool() const;
|
||||
private:
|
||||
String local_name;
|
||||
|
||||
|
Reference in New Issue
Block a user