Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1a5b367

Browse filesBrowse files
authored
Merge branch 'master' into WiFiClient_fix
2 parents dd09175 + e0657db commit 1a5b367
Copy full SHA for 1a5b367

File tree

3 files changed

+22
-3
lines changed
Filter options

3 files changed

+22
-3
lines changed

‎cores/esp32/HWCDC.cpp

Copy file name to clipboardExpand all lines: cores/esp32/HWCDC.cpp
+12-3Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,18 @@ void HWCDC::begin(unsigned long baud)
173173
if(tx_lock == NULL) {
174174
tx_lock = xSemaphoreCreateMutex();
175175
}
176-
setRxBufferSize(256);//default if not preset
177-
setTxBufferSize(256);//default if not preset
178-
176+
//RX Buffer default has 256 bytes if not preset
177+
if(rx_queue == NULL) {
178+
if (!setRxBufferSize(256)) {
179+
log_e("HW CDC RX Buffer error");
180+
}
181+
}
182+
//TX Buffer default has 256 bytes if not preset
183+
if (tx_ring_buf == NULL) {
184+
if (!setTxBufferSize(256)) {
185+
log_e("HW CDC TX Buffer error");
186+
}
187+
}
179188
usb_serial_jtag_ll_disable_intr_mask(USB_SERIAL_JTAG_LL_INTR_MASK);
180189
usb_serial_jtag_ll_clr_intsts_mask(USB_SERIAL_JTAG_LL_INTR_MASK);
181190
usb_serial_jtag_ll_ena_intr_mask(USB_SERIAL_JTAG_INTR_SERIAL_IN_EMPTY | USB_SERIAL_JTAG_INTR_SERIAL_OUT_RECV_PKT | USB_SERIAL_JTAG_INTR_BUS_RESET);

‎cores/esp32/esp32-hal-bt.c

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-bt.c
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@
1616

1717
#ifdef CONFIG_BT_ENABLED
1818

19+
#if CONFIG_IDF_TARGET_ESP32
20+
bool btInUse(){ return true; }
21+
#else
1922
// user may want to change it to free resources
2023
__attribute__((weak)) bool btInUse(){ return true; }
24+
#endif
2125

2226
#include "esp_bt.h"
2327

‎cores/esp32/esp32-hal-misc.c

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-misc.c
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,15 @@ bool verifyRollbackLater() { return false; }
209209
#endif
210210

211211
#ifdef CONFIG_BT_ENABLED
212+
#if CONFIG_IDF_TARGET_ESP32
213+
//overwritten in esp32-hal-bt.c
214+
bool btInUse() __attribute__((weak));
215+
bool btInUse(){ return false; }
216+
#else
212217
//from esp32-hal-bt.c
213218
extern bool btInUse();
214219
#endif
220+
#endif
215221

216222
void initArduino()
217223
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.