File tree 3 files changed +22
-3
lines changed
3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -173,9 +173,18 @@ void HWCDC::begin(unsigned long baud)
173
173
if (tx_lock == NULL ) {
174
174
tx_lock = xSemaphoreCreateMutex ();
175
175
}
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
+ }
179
188
usb_serial_jtag_ll_disable_intr_mask (USB_SERIAL_JTAG_LL_INTR_MASK);
180
189
usb_serial_jtag_ll_clr_intsts_mask (USB_SERIAL_JTAG_LL_INTR_MASK);
181
190
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);
Original file line number Diff line number Diff line change 16
16
17
17
#ifdef CONFIG_BT_ENABLED
18
18
19
+ #if CONFIG_IDF_TARGET_ESP32
20
+ bool btInUse (){ return true; }
21
+ #else
19
22
// user may want to change it to free resources
20
23
__attribute__((weak )) bool btInUse (){ return true; }
24
+ #endif
21
25
22
26
#include "esp_bt.h"
23
27
Original file line number Diff line number Diff line change @@ -209,9 +209,15 @@ bool verifyRollbackLater() { return false; }
209
209
#endif
210
210
211
211
#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
212
217
//from esp32-hal-bt.c
213
218
extern bool btInUse ();
214
219
#endif
220
+ #endif
215
221
216
222
void initArduino ()
217
223
{
You can’t perform that action at this time.
0 commit comments