diff --git a/docs/en/api-reference/system/esp_expression_with_stack.rst b/docs/en/api-reference/system/esp_expression_with_stack.rst index ed12dc444..cf77b2683 100644 --- a/docs/en/api-reference/system/esp_expression_with_stack.rst +++ b/docs/en/api-reference/system/esp_expression_with_stack.rst @@ -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); }