freertos.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * File Name : freertos.c
  5. * Description : Code for freertos applications
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * Copyright (c) 2024 STMicroelectronics.
  10. * All rights reserved.
  11. *
  12. * This software is licensed under terms that can be found in the LICENSE file
  13. * in the root directory of this software component.
  14. * If no LICENSE file comes with this software, it is provided AS-IS.
  15. *
  16. ******************************************************************************
  17. */
  18. /* USER CODE END Header */
  19. /* Includes ------------------------------------------------------------------*/
  20. #include "FreeRTOS.h"
  21. #include "task.h"
  22. #include "main.h"
  23. /* Private includes ----------------------------------------------------------*/
  24. /* USER CODE BEGIN Includes */
  25. /* USER CODE END Includes */
  26. /* Private typedef -----------------------------------------------------------*/
  27. /* USER CODE BEGIN PTD */
  28. /* USER CODE END PTD */
  29. /* Private define ------------------------------------------------------------*/
  30. /* USER CODE BEGIN PD */
  31. /* USER CODE END PD */
  32. /* Private macro -------------------------------------------------------------*/
  33. /* USER CODE BEGIN PM */
  34. /* USER CODE END PM */
  35. /* Private variables ---------------------------------------------------------*/
  36. /* USER CODE BEGIN Variables */
  37. /* USER CODE END Variables */
  38. /* Private function prototypes -----------------------------------------------*/
  39. /* USER CODE BEGIN FunctionPrototypes */
  40. /* USER CODE END FunctionPrototypes */
  41. /* GetIdleTaskMemory prototype (linked to static allocation support) */
  42. void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize );
  43. /* USER CODE BEGIN GET_IDLE_TASK_MEMORY */
  44. static StaticTask_t xIdleTaskTCBBuffer;
  45. static StackType_t xIdleStack[configMINIMAL_STACK_SIZE];
  46. void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize )
  47. {
  48. *ppxIdleTaskTCBBuffer = &xIdleTaskTCBBuffer;
  49. *ppxIdleTaskStackBuffer = &xIdleStack[0];
  50. *pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
  51. /* place for user code */
  52. }
  53. /* USER CODE END GET_IDLE_TASK_MEMORY */
  54. /* Private application code --------------------------------------------------*/
  55. /* USER CODE BEGIN Application */
  56. /* USER CODE END Application */