Skip to content

Commit b92e338

Browse files
committed
feat(net): Allow for event task custom stack size
1 parent 9eb7dc6 commit b92e338

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: libraries/Network/src/NetworkEvents.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
#include "esp_task.h"
99
#include "esp32-hal.h"
1010

11+
#ifndef ARDUINO_NETWORK_EVENT_TASK_STACK_SIZE
12+
#define ARDUINO_NETWORK_EVENT_TASK_STACK_SIZE 4096
13+
#endif
14+
1115
NetworkEvents::NetworkEvents() : _arduino_event_group(NULL), _arduino_event_queue(NULL), _arduino_event_task_handle(NULL) {}
1216

1317
NetworkEvents::~NetworkEvents() {
@@ -61,8 +65,8 @@ bool NetworkEvents::initNetworkEvents() {
6165
[](void *self) {
6266
static_cast<NetworkEvents *>(self)->_checkForEvent();
6367
},
64-
"arduino_events", // label
65-
4096, // event task's stack size
68+
"arduino_events", // label
69+
ARDUINO_NETWORK_EVENT_TASK_STACK_SIZE, // event task's stack size
6670
this, ESP_TASKD_EVENT_PRIO - 1, &_arduino_event_task_handle, ARDUINO_EVENT_RUNNING_CORE
6771
);
6872
if (!_arduino_event_task_handle) {

0 commit comments

Comments
 (0)