Skip to content

Commit b385562

Browse files
thekurtovicme-no-devpre-commit-ci-lite[bot]
authored
NetworkEvents allow stack size to be changed. (#10805)
* feat(net): Allow for event task custom stack size * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: Me No Dev <[email protected]> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent 6eb99d3 commit b385562

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)