freertos.c 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. /* GetTimerTaskMemory prototype (linked to static allocation support) */
  44. void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize );
  45. /* USER CODE BEGIN GET_IDLE_TASK_MEMORY */
  46. static StaticTask_t xIdleTaskTCBBuffer;
  47. static StackType_t xIdleStack[configMINIMAL_STACK_SIZE];
  48. void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize )
  49. {
  50. *ppxIdleTaskTCBBuffer = &xIdleTaskTCBBuffer;
  51. *ppxIdleTaskStackBuffer = &xIdleStack[0];
  52. *pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
  53. /* place for user code */
  54. }
  55. /* USER CODE END GET_IDLE_TASK_MEMORY */
  56. /* USER CODE BEGIN GET_TIMER_TASK_MEMORY */
  57. static StaticTask_t xTimerTaskTCBBuffer;
  58. static StackType_t xTimerStack[configTIMER_TASK_STACK_DEPTH];
  59. void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize )
  60. {
  61. *ppxTimerTaskTCBBuffer = &xTimerTaskTCBBuffer;
  62. *ppxTimerTaskStackBuffer = &xTimerStack[0];
  63. *pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
  64. /* place for user code */
  65. }
  66. /* USER CODE END GET_TIMER_TASK_MEMORY */
  67. /* Private application code --------------------------------------------------*/
  68. /* USER CODE BEGIN Application */
  69. /* USER CODE END Application */