Skip to content

Commit

Permalink
NetworkEvents allow stack size to be changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
thekurtovic authored Jan 4, 2025
1 parent 9eb7dc6 commit d6c61cf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libraries/Network/src/NetworkEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#include "esp_task.h"
#include "esp32-hal.h"

#ifndef ARDUINO_NETWORK_EVENT_TASK_STACK_SIZE
#define ARDUINO_NETWORK_EVENT_TASK_STACK_SIZE 4096
#endif

NetworkEvents::NetworkEvents() : _arduino_event_group(NULL), _arduino_event_queue(NULL), _arduino_event_task_handle(NULL) {}

NetworkEvents::~NetworkEvents() {
Expand Down Expand Up @@ -61,8 +65,8 @@ bool NetworkEvents::initNetworkEvents() {
[](void *self) {
static_cast<NetworkEvents *>(self)->_checkForEvent();
},
"arduino_events", // label
4096, // event task's stack size
"arduino_events", // label
ARDUINO_NETWORK_EVENT_TASK_STACK_SIZE, // event task's stack size
this, ESP_TASKD_EVENT_PRIO - 1, &_arduino_event_task_handle, ARDUINO_EVENT_RUNNING_CORE
);
if (!_arduino_event_task_handle) {
Expand Down

0 comments on commit d6c61cf

Please sign in to comment.