Skip to content

Commit f9f2116

Browse files
committed
Add CYW43_NO_DEFAULT_TASK_STACK
In theory you can use your own async context therefore bypassing cyw43_arch_init_default_async_context, which would leave cyw43_async_context_freertos_task_stack unused. Add a #define for this rare situation.
1 parent 420a404 commit f9f2116

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rp2_common/pico_cyw43_arch/cyw43_arch_freertos.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
static async_context_freertos_t cyw43_async_context_freertos;
2727

28-
#if configSUPPORT_STATIC_ALLOCATION
28+
#if configSUPPORT_STATIC_ALLOCATION && !CYW43_NO_DEFAULT_TASK_STACK
2929
static StackType_t cyw43_async_context_freertos_task_stack[CYW43_TASK_STACK_SIZE];
3030
#endif
3131

@@ -37,7 +37,7 @@ async_context_t *cyw43_arch_init_default_async_context(void) {
3737
#ifdef CYW43_TASK_STACK_SIZE
3838
config.task_stack_size = CYW43_TASK_STACK_SIZE;
3939
#endif
40-
#if configSUPPORT_STATIC_ALLOCATION
40+
#if configSUPPORT_STATIC_ALLOCATION && !CYW43_NO_DEFAULT_TASK_STACK
4141
config.task_stack = cyw43_async_context_freertos_task_stack;
4242
#endif
4343
if (async_context_freertos_init(&cyw43_async_context_freertos, &config))

0 commit comments

Comments
 (0)