Allow setting stack size via user defines

Based on https://github.com/me-no-dev/AsyncTCP/pull/89 . This is a
trivial change and potentially useful.
This commit is contained in:
Alex Villacís Lasso
2021-10-28 17:22:39 -05:00
parent 9a6ab11adf
commit 0714013c68
2 changed files with 4 additions and 1 deletions

View File

@@ -63,7 +63,7 @@ static bool _start_asyncsock_task(void)
xTaskCreateUniversal(
_asynctcpsock_task,
"asyncTcpSock",
8192 * 2,
CONFIG_ASYNC_TCP_STACK,
NULL,
3, // <-- TODO: make priority a compile-time parameter
&_asyncsock_service_task_handle,

View File

@@ -44,6 +44,9 @@ extern "C" {
#define CONFIG_ASYNC_TCP_RUNNING_CORE -1 //any available core
#define CONFIG_ASYNC_TCP_USE_WDT 1 //if enabled, adds between 33us and 200us per event
#endif
#ifndef CONFIG_ASYNC_TCP_STACK
#define CONFIG_ASYNC_TCP_STACK 16384 // 8192 * 2
#endif
class AsyncClient;