Explorar el Código

docs: update on expression with stack api usage regard the stack setup.

Felipe Neves hace 6 años
padre
commit
8bfb8e885e
Se han modificado 1 ficheros con 1 adiciones y 6 borrados
  1. 1 6
      docs/en/api-reference/system/esp_expression_with_stack.rst

+ 1 - 6
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);    
     }