Skip to content

Commit df8c70c

Browse files
authored
Merge branch 'master' into feature/mac-adress-refactor
2 parents 2b18f32 + 4123e20 commit df8c70c

File tree

15 files changed

+828
-582
lines changed

15 files changed

+828
-582
lines changed

.github/workflows/docs_build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
PATH=/home/runner/.local/bin:$PATH pip3 install -r requirements.txt --prefer-binary
3939
PATH=/home/runner/.local/bin:$PATH SPHINXOPTS="-W" build-docs -l en
4040
- name: Archive Docs
41-
uses: actions/upload-artifact@v2
41+
uses: actions/upload-artifact@v4
4242
with:
4343
name: docs
4444
path: docs

.github/workflows/hil.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
run: |
5757
bash .github/scripts/tests_build.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}}
5858
- name: Upload ${{matrix.chip}}-${{matrix.chunks}} artifacts
59-
uses: actions/upload-artifact@v3
59+
uses: actions/upload-artifact@v4
6060
with:
6161
name: ${{matrix.chip}}-${{matrix.chunks}}.artifacts
6262
path: |
@@ -81,7 +81,7 @@ jobs:
8181
uses: actions/checkout@v4
8282

8383
- name: Download ${{matrix.chip}}-${{matrix.chunks}} artifacts
84-
uses: actions/download-artifact@v3
84+
uses: actions/download-artifact@v4
8585
with:
8686
name: ${{matrix.chip}}-${{matrix.chunks}}.artifacts
8787
path: ~/.arduino/tests/
@@ -97,7 +97,7 @@ jobs:
9797
bash .github/scripts/tests_run.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}} -e
9898
9999
- name: Upload test result artifacts
100-
uses: actions/upload-artifact@v3
100+
uses: actions/upload-artifact@v4
101101
if: always()
102102
with:
103103
name: test_results-${{matrix.chip}}-${{matrix.chunks}}
@@ -112,7 +112,7 @@ jobs:
112112
runs-on: ubuntu-latest
113113
steps:
114114
- name: Upload
115-
uses: actions/upload-artifact@v3
115+
uses: actions/upload-artifact@v4
116116
with:
117117
name: Event File
118118
path: ${{github.event_path}}

.github/workflows/lib.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ jobs:
7575
- --warnings="all"
7676
7777
- name: Upload artifact
78-
uses: actions/upload-artifact@v3
78+
uses: actions/upload-artifact@v4
7979
with:
80-
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
80+
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}-${{ matrix.target }}
8181
path: ${{ env.SKETCHES_REPORTS_PATH }}
8282

8383
report-to-file:
@@ -98,9 +98,10 @@ jobs:
9898

9999
# This step is needed to get the size data produced by the compile jobs
100100
- name: Download sketches reports artifact
101-
uses: actions/download-artifact@v3
101+
uses: actions/download-artifact@v4
102102
with:
103-
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
103+
pattern: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}-*
104+
merge-multiple: true
104105
path: ${{ env.SKETCHES_REPORTS_PATH }}
105106

106107
- name: Report results
@@ -129,7 +130,7 @@ jobs:
129130
runs-on: ubuntu-latest
130131
steps:
131132
- name: Upload
132-
uses: actions/upload-artifact@v2
133+
uses: actions/upload-artifact@v4
133134
with:
134135
name: Event File
135-
path: ${{github.event_path}}
136+
path: ${{github.event_path}}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Arduino core for the ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2
22

3-
![Build Status](https://github.com/espressif/arduino-esp32/workflows/ESP32%20Arduino%20CI/badge.svg) [![External Libraries Test](https://github.com/espressif/arduino-esp32/actions/workflows/lib.yml/badge.svg?branch=master&event=schedule)](https://github.com/espressif/arduino-esp32/actions/workflows/lib.yml?link=http://https://github.com/espressif/arduino-esp32/blob/master/LIBRARIES_TEST.md)
3+
![Build Status](https://github.com/espressif/arduino-esp32/workflows/ESP32%20Arduino%20CI/badge.svg) [![External Libraries Test](https://github.com/espressif/arduino-esp32/actions/workflows/lib.yml/badge.svg?branch=master&event=schedule)](https://github.com/espressif/arduino-esp32/blob/gh-pages/LIBRARIES_TEST.md) [![Hardware Tests](https://github.com/espressif/arduino-esp32/actions/workflows/hil.yml/badge.svg?branch=master&event=schedule)](https://github.com/espressif/arduino-esp32/actions/workflows/hil.yml?query=event%3Aschedule)
44

55
### Need help or have a question? Join the chat at [Gitter](https://gitter.im/espressif/arduino-esp32) or [open a new Discussion](https://github.com/espressif/arduino-esp32/discussions)
66

boards.txt

+149
Original file line numberDiff line numberDiff line change
@@ -29533,6 +29533,155 @@ XIAO_ESP32C3.menu.EraseFlash.all.upload.erase_cmd=-e
2953329533

2953429534
##############################################################
2953529535

29536+
XIAO_ESP32C6.name=XIAO_ESP32C6
29537+
XIAO_ESP32C6.vid.0=0x303a
29538+
XIAO_ESP32C6.pid.0=0x1001
29539+
29540+
XIAO_ESP32C6.bootloader.tool=esptool_py
29541+
XIAO_ESP32C6.bootloader.tool.default=esptool_py
29542+
29543+
XIAO_ESP32C6.upload.tool=esptool_py
29544+
XIAO_ESP32C6.upload.tool.default=esptool_py
29545+
XIAO_ESP32C6.upload.tool.network=esp_ota
29546+
29547+
XIAO_ESP32C6.upload.maximum_size=1310720
29548+
XIAO_ESP32C6.upload.maximum_data_size=327680
29549+
XIAO_ESP32C6.upload.flags=
29550+
XIAO_ESP32C6.upload.extra_flags=
29551+
XIAO_ESP32C6.upload.use_1200bps_touch=false
29552+
XIAO_ESP32C6.upload.wait_for_upload_port=false
29553+
29554+
XIAO_ESP32C6.serial.disableDTR=false
29555+
XIAO_ESP32C6.serial.disableRTS=false
29556+
29557+
XIAO_ESP32C6.build.tarch=riscv32
29558+
XIAO_ESP32C6.build.target=esp
29559+
XIAO_ESP32C6.build.mcu=esp32c6
29560+
XIAO_ESP32C6.build.core=esp32
29561+
XIAO_ESP32C6.build.variant=XIAO_ESP32C6
29562+
XIAO_ESP32C6.build.board=XIAO_ESP32C3
29563+
XIAO_ESP32C6.build.bootloader_addr=0x0
29564+
29565+
XIAO_ESP32C6.build.cdc_on_boot=1
29566+
XIAO_ESP32C6.build.f_cpu=160000000L
29567+
XIAO_ESP32C6.build.flash_size=4MB
29568+
XIAO_ESP32C6.build.flash_freq=80m
29569+
XIAO_ESP32C6.build.flash_mode=qio
29570+
XIAO_ESP32C6.build.boot=qio
29571+
XIAO_ESP32C6.build.partitions=default
29572+
XIAO_ESP32C6.build.defines=
29573+
29574+
## IDE 2.0 Seems to not update the value
29575+
XIAO_ESP32C6.menu.JTAGAdapter.default=Disabled
29576+
XIAO_ESP32C6.menu.JTAGAdapter.default.build.copy_jtag_files=0
29577+
XIAO_ESP32C6.menu.JTAGAdapter.builtin=Integrated USB JTAG
29578+
XIAO_ESP32C6.menu.JTAGAdapter.builtin.build.openocdscript=esp32c6-builtin.cfg
29579+
XIAO_ESP32C6.menu.JTAGAdapter.builtin.build.copy_jtag_files=1
29580+
XIAO_ESP32C6.menu.JTAGAdapter.external=FTDI Adapter
29581+
XIAO_ESP32C6.menu.JTAGAdapter.external.build.openocdscript=esp32c6-ftdi.cfg
29582+
XIAO_ESP32C6.menu.JTAGAdapter.external.build.copy_jtag_files=1
29583+
XIAO_ESP32C6.menu.JTAGAdapter.bridge=ESP USB Bridge
29584+
XIAO_ESP32C6.menu.JTAGAdapter.bridge.build.openocdscript=esp32c6-bridge.cfg
29585+
XIAO_ESP32C6.menu.JTAGAdapter.bridge.build.copy_jtag_files=1
29586+
29587+
XIAO_ESP32C6.menu.CDCOnBoot.cdc=Enabled
29588+
XIAO_ESP32C6.menu.CDCOnBoot.cdc.build.cdc_on_boot=1
29589+
XIAO_ESP32C6.menu.CDCOnBoot.default=Disabled
29590+
XIAO_ESP32C6.menu.CDCOnBoot.default.build.cdc_on_boot=0
29591+
29592+
XIAO_ESP32C6.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
29593+
XIAO_ESP32C6.menu.PartitionScheme.default.build.partitions=default
29594+
XIAO_ESP32C6.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
29595+
XIAO_ESP32C6.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
29596+
XIAO_ESP32C6.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
29597+
XIAO_ESP32C6.menu.PartitionScheme.no_ota.build.partitions=no_ota
29598+
XIAO_ESP32C6.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
29599+
XIAO_ESP32C6.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
29600+
XIAO_ESP32C6.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
29601+
XIAO_ESP32C6.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
29602+
XIAO_ESP32C6.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
29603+
XIAO_ESP32C6.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
29604+
XIAO_ESP32C6.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
29605+
XIAO_ESP32C6.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
29606+
XIAO_ESP32C6.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
29607+
XIAO_ESP32C6.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
29608+
XIAO_ESP32C6.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
29609+
XIAO_ESP32C6.menu.PartitionScheme.huge_app.build.partitions=huge_app
29610+
XIAO_ESP32C6.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
29611+
29612+
XIAO_ESP32C6.menu.CPUFreq.160=160MHz (WiFi)
29613+
XIAO_ESP32C6.menu.CPUFreq.160.build.f_cpu=160000000L
29614+
XIAO_ESP32C6.menu.CPUFreq.80=80MHz (WiFi)
29615+
XIAO_ESP32C6.menu.CPUFreq.80.build.f_cpu=80000000L
29616+
XIAO_ESP32C6.menu.CPUFreq.40=40MHz
29617+
XIAO_ESP32C6.menu.CPUFreq.40.build.f_cpu=40000000L
29618+
XIAO_ESP32C6.menu.CPUFreq.20=20MHz
29619+
XIAO_ESP32C6.menu.CPUFreq.20.build.f_cpu=20000000L
29620+
XIAO_ESP32C6.menu.CPUFreq.10=10MHz
29621+
XIAO_ESP32C6.menu.CPUFreq.10.build.f_cpu=10000000L
29622+
29623+
XIAO_ESP32C6.menu.FlashMode.qio=QIO
29624+
XIAO_ESP32C6.menu.FlashMode.qio.build.flash_mode=dio
29625+
XIAO_ESP32C6.menu.FlashMode.qio.build.boot=qio
29626+
XIAO_ESP32C6.menu.FlashMode.dio=DIO
29627+
XIAO_ESP32C6.menu.FlashMode.dio.build.flash_mode=dio
29628+
XIAO_ESP32C6.menu.FlashMode.dio.build.boot=dio
29629+
29630+
XIAO_ESP32C6.menu.FlashFreq.80=80MHz
29631+
XIAO_ESP32C6.menu.FlashFreq.80.build.flash_freq=80m
29632+
XIAO_ESP32C6.menu.FlashFreq.40=40MHz
29633+
XIAO_ESP32C6.menu.FlashFreq.40.build.flash_freq=40m
29634+
29635+
XIAO_ESP32C6.menu.FlashSize.4M=4MB (32Mb)
29636+
XIAO_ESP32C6.menu.FlashSize.4M.build.flash_size=4MB
29637+
29638+
XIAO_ESP32C6.menu.UploadSpeed.921600=921600
29639+
XIAO_ESP32C6.menu.UploadSpeed.921600.upload.speed=921600
29640+
XIAO_ESP32C6.menu.UploadSpeed.115200=115200
29641+
XIAO_ESP32C6.menu.UploadSpeed.115200.upload.speed=115200
29642+
XIAO_ESP32C6.menu.UploadSpeed.256000.windows=256000
29643+
XIAO_ESP32C6.menu.UploadSpeed.256000.upload.speed=256000
29644+
XIAO_ESP32C6.menu.UploadSpeed.230400.windows.upload.speed=256000
29645+
XIAO_ESP32C6.menu.UploadSpeed.230400=230400
29646+
XIAO_ESP32C6.menu.UploadSpeed.230400.upload.speed=230400
29647+
XIAO_ESP32C6.menu.UploadSpeed.460800.linux=460800
29648+
XIAO_ESP32C6.menu.UploadSpeed.460800.macosx=460800
29649+
XIAO_ESP32C6.menu.UploadSpeed.460800.upload.speed=460800
29650+
XIAO_ESP32C6.menu.UploadSpeed.512000.windows=512000
29651+
XIAO_ESP32C6.menu.UploadSpeed.512000.upload.speed=512000
29652+
29653+
XIAO_ESP32C6.menu.DebugLevel.none=None
29654+
XIAO_ESP32C6.menu.DebugLevel.none.build.code_debug=0
29655+
XIAO_ESP32C6.menu.DebugLevel.error=Error
29656+
XIAO_ESP32C6.menu.DebugLevel.error.build.code_debug=1
29657+
XIAO_ESP32C6.menu.DebugLevel.warn=Warn
29658+
XIAO_ESP32C6.menu.DebugLevel.warn.build.code_debug=2
29659+
XIAO_ESP32C6.menu.DebugLevel.info=Info
29660+
XIAO_ESP32C6.menu.DebugLevel.info.build.code_debug=3
29661+
XIAO_ESP32C6.menu.DebugLevel.debug=Debug
29662+
XIAO_ESP32C6.menu.DebugLevel.debug.build.code_debug=4
29663+
XIAO_ESP32C6.menu.DebugLevel.verbose=Verbose
29664+
XIAO_ESP32C6.menu.DebugLevel.verbose.build.code_debug=5
29665+
29666+
XIAO_ESP32C6.menu.EraseFlash.none=Disabled
29667+
XIAO_ESP32C6.menu.EraseFlash.none.upload.erase_cmd=
29668+
XIAO_ESP32C6.menu.EraseFlash.all=Enabled
29669+
XIAO_ESP32C6.menu.EraseFlash.all.upload.erase_cmd=-e
29670+
29671+
XIAO_ESP32C6.menu.ZigbeeMode.default=Disabled
29672+
XIAO_ESP32C6.menu.ZigbeeMode.default.build.zigbee_mode=
29673+
XIAO_ESP32C6.menu.ZigbeeMode.default.build.zigbee_libs=
29674+
XIAO_ESP32C6.menu.ZigbeeMode.ed=Zigbee ED (end device)
29675+
XIAO_ESP32C6.menu.ZigbeeMode.ed.build.zigbee_mode=-DZIGBEE_MODE_ED
29676+
XIAO_ESP32C6.menu.ZigbeeMode.ed.build.zigbee_libs=-lesp_zb_api_ed -lesp_zb_cli_command -lzboss_stack.ed.trace -lzboss_stack.ed -lzboss_port
29677+
XIAO_ESP32C6.menu.ZigbeeMode.zczr=Zigbee ZCZR (coordinator)
29678+
XIAO_ESP32C6.menu.ZigbeeMode.zczr.build.zigbee_mode=-DZIGBEE_MODE_ZCZR
29679+
XIAO_ESP32C6.menu.ZigbeeMode.zczr.build.zigbee_libs=-lesp_zb_api_zczr -lesp_zb_cli_command -lzboss_stack.zczr.trace -lzboss_stack.zczr -lzboss_port
29680+
XIAO_ESP32C6.menu.ZigbeeMode.rcp=Zigbee RCP (radio co-processor)
29681+
XIAO_ESP32C6.menu.ZigbeeMode.rcp.build.zigbee_mode=-DZIGBEE_MODE_RCP
29682+
XIAO_ESP32C6.menu.ZigbeeMode.rcp.build.zigbee_libs=-lesp_zb_api_rcp -lesp_zb_cli_command -lzboss_stack.rcp -lzboss_port
29683+
29684+
##############################################################
2953629685

2953729686
XIAO_ESP32S3.name=XIAO_ESP32S3
2953829687
XIAO_ESP32S3.vid.0=0x2886

cores/esp32/HWCDC.cpp

+27-9
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ static void ARDUINO_ISR_ATTR cdc0_write_char(char c) {
177177
}
178178

179179
HWCDC::HWCDC() {
180-
180+
perimanSetBusDeinit(ESP32_BUS_TYPE_USB_DM, HWCDC::deinit);
181+
perimanSetBusDeinit(ESP32_BUS_TYPE_USB_DP, HWCDC::deinit);
181182
}
182183

183184
HWCDC::~HWCDC(){
@@ -238,26 +239,43 @@ void HWCDC::begin(unsigned long baud)
238239
}
239240
}
240241
usb_serial_jtag_ll_disable_intr_mask(USB_SERIAL_JTAG_LL_INTR_MASK);
241-
usb_serial_jtag_ll_clr_intsts_mask(USB_SERIAL_JTAG_LL_INTR_MASK);
242242
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);
243243
if(!intr_handle && esp_intr_alloc(ETS_USB_SERIAL_JTAG_INTR_SOURCE, 0, hw_cdc_isr_handler, NULL, &intr_handle) != ESP_OK){
244244
isr_log_e("HW USB CDC failed to init interrupts");
245245
end();
246246
return;
247247
}
248-
if (perimanSetBusDeinit(ESP32_BUS_TYPE_USB_DM, HWCDC::deinit) && perimanSetBusDeinit(ESP32_BUS_TYPE_USB_DP, HWCDC::deinit)) {
249-
// Setting USB D+ D- pins
250-
perimanSetPinBus(USB_DM_GPIO_NUM, ESP32_BUS_TYPE_USB_DM, (void *) this, -1, -1);
251-
perimanSetPinBus(USB_DP_GPIO_NUM, ESP32_BUS_TYPE_USB_DP, (void *) this, -1, -1);
252-
} else {
253-
log_e("Serial JTAG Pins can't be set into Peripheral Manager.");
248+
// Setting USB D+ D- pins
249+
uint8_t pin = ESP32_BUS_TYPE_USB_DM;
250+
if(perimanGetPinBusType(pin) != ESP32_BUS_TYPE_INIT){
251+
if(!perimanClearPinBus(pin)){
252+
goto err;
253+
}
254+
}
255+
if(!perimanSetPinBus(pin, ESP32_BUS_TYPE_USB_DM, (void *) this, -1, -1)){
256+
goto err;
254257
}
258+
pin = ESP32_BUS_TYPE_USB_DP;
259+
if(perimanGetPinBusType(pin) != ESP32_BUS_TYPE_INIT){
260+
if(!perimanClearPinBus(pin)){
261+
goto err;
262+
}
263+
}
264+
if(!perimanSetPinBus(pin, ESP32_BUS_TYPE_USB_DP, (void *) this, -1, -1)){
265+
goto err;
266+
}
267+
return;
268+
269+
err:
270+
log_e("Serial JTAG Pin %u can't be set into Peripheral Manager.", pin);
271+
end();
255272
}
256273

257274
void HWCDC::end()
258275
{
259-
//Disable tx/rx interrupt.
276+
//Disable/clear/free tx/rx interrupt.
260277
usb_serial_jtag_ll_disable_intr_mask(USB_SERIAL_JTAG_LL_INTR_MASK);
278+
usb_serial_jtag_ll_clr_intsts_mask(USB_SERIAL_JTAG_LL_INTR_MASK);
261279
esp_intr_free(intr_handle);
262280
intr_handle = NULL;
263281
if(tx_lock != NULL) {

cores/esp32/HardwareSerial.cpp

+11-9
Original file line numberDiff line numberDiff line change
@@ -537,35 +537,37 @@ bool HardwareSerial::setMode(SerialMode mode)
537537
return uartSetMode(_uart, mode);
538538
}
539539

540+
// minimum total RX Buffer size is the UART FIFO space (128 bytes for most SoC) + 1. IDF imposition.
540541
size_t HardwareSerial::setRxBufferSize(size_t new_size) {
541542

542543
if (_uart) {
543-
log_e("RX Buffer can't be resized when Serial is already running.\n");
544+
log_e("RX Buffer can't be resized when Serial is already running. Set it before calling begin().");
544545
return 0;
545546
}
546547

547548
if (new_size <= SOC_UART_FIFO_LEN) {
548-
log_e("RX Buffer must be higher than %d.\n", SOC_UART_FIFO_LEN); // ESP32, S2, S3 and C3 means higher than 128
549-
return 0;
549+
log_w("RX Buffer set to minimum value: %d.", SOC_UART_FIFO_LEN + 1); // ESP32, S2, S3 and C3 means higher than 128
550+
new_size = SOC_UART_FIFO_LEN + 1;
550551
}
551552

552553
_rxBufferSize = new_size;
553554
return _rxBufferSize;
554555
}
555556

557+
// minimum total TX Buffer size is the UART FIFO space (128 bytes for most SoC).
556558
size_t HardwareSerial::setTxBufferSize(size_t new_size) {
557559

558560
if (_uart) {
559-
log_e("TX Buffer can't be resized when Serial is already running.\n");
561+
log_e("TX Buffer can't be resized when Serial is already running. Set it before calling begin().");
560562
return 0;
561563
}
562564

563565
if (new_size <= SOC_UART_FIFO_LEN) {
564-
log_e("TX Buffer must be higher than %d.\n", SOC_UART_FIFO_LEN); // ESP32, S2, S3 and C3 means higher than 128
565-
return 0;
566+
log_w("TX Buffer set to minimum value: %d.", SOC_UART_FIFO_LEN); // ESP32, S2, S3 and C3 means higher than 128
567+
_txBufferSize = 0; // it will use just UART FIFO with SOC_UART_FIFO_LEN bytes (128 for most SoC)
568+
return SOC_UART_FIFO_LEN;
566569
}
567-
570+
// if new_size is higher than SOC_UART_FIFO_LEN, TX Ringbuffer will be active and it will be used to report back "availableToWrite()"
568571
_txBufferSize = new_size;
569-
return _txBufferSize;
572+
return new_size;
570573
}
571-

0 commit comments

Comments
 (0)