Skip to content

Commit 0af5423

Browse files
authored
feat(usb): global event task stack size normalization
1 parent e89f442 commit 0af5423

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cores/esp32/HWCDC.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "USB.h"
1515
#if SOC_USB_SERIAL_JTAG_SUPPORTED
1616

17+
#include "Arduino.h" // defines ARDUINO_SERIAL_EVENT_TASK_STACK_SIZE
1718
#include "esp32-hal.h"
1819
#include "esp32-hal-periman.h"
1920
#include "HWCDC.h"
@@ -60,7 +61,7 @@ static esp_err_t
6061
arduino_hw_cdc_event_handler_register_with(esp_event_base_t event_base, int32_t event_id, esp_event_handler_t event_handler, void *event_handler_arg) {
6162
if (!arduino_hw_cdc_event_loop_handle) {
6263
esp_event_loop_args_t event_task_args = {
63-
.queue_size = 5, .task_name = "arduino_hw_cdc_events", .task_priority = 5, .task_stack_size = 2048, .task_core_id = tskNO_AFFINITY
64+
.queue_size = 5, .task_name = "arduino_hw_cdc_events", .task_priority = 5, .task_stack_size = ARDUINO_SERIAL_EVENT_TASK_STACK_SIZE, .task_core_id = tskNO_AFFINITY
6465
};
6566
if (esp_event_loop_create(&event_task_args, &arduino_hw_cdc_event_loop_handle) != ESP_OK) {
6667
log_e("esp_event_loop_create failed");

0 commit comments

Comments
 (0)