docs: update on expression with stack api usage regard the stack setup.
@@ -33,17 +33,12 @@ The usage may looks like the code below:
//Allocate a stack buffer, from heap or as a static form:
portSTACK_TYPE *shared_stack = malloc(8192 * sizeof(portSTACK_TYPE));
- //points to the top of stack, that is it the last word of allocated buffer:
- portSTACK_TYPE *ext_stack_top = (portSTACK_TYPE *)&shared_stack[0] +
- ((sizeof(8192 * sizeof(portSTACK_TYPE))) /
- sizeof(portSTACK_TYPE));
-
//Allocate a mutex to protect its usage:
SemaphoreHandle_t printf_lock = xSemaphoreCreateMutex();
//Call the desired function using the macro helper:
ESP_EXECUTE_EXPRESSION_WITH_STACK(printf_lock,
- ext_stack_top,
+ shared_stack,
printf("Executing this from external stack! \n"));
free(shared_stack);
}
