freertos.c 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * File Name : freertos.c
  5. * Description : Code for freertos applications
  6. ******************************************************************************
  7. * This notice applies to any and all portions of this file
  8. * that are not between comment pairs USER CODE BEGIN and
  9. * USER CODE END. Other portions of this file, whether
  10. * inserted by the user or by software development tools
  11. * are owned by their respective copyright owners.
  12. *
  13. * Copyright (c) 2020 STMicroelectronics International N.V.
  14. * All rights reserved.
  15. *
  16. * Redistribution and use in source and binary forms, with or without
  17. * modification, are permitted, provided that the following conditions are met:
  18. *
  19. * 1. Redistribution of source code must retain the above copyright notice,
  20. * this list of conditions and the following disclaimer.
  21. * 2. Redistributions in binary form must reproduce the above copyright notice,
  22. * this list of conditions and the following disclaimer in the documentation
  23. * and/or other materials provided with the distribution.
  24. * 3. Neither the name of STMicroelectronics nor the names of other
  25. * contributors to this software may be used to endorse or promote products
  26. * derived from this software without specific written permission.
  27. * 4. This software, including modifications and/or derivative works of this
  28. * software, must execute solely and exclusively on microcontroller or
  29. * microprocessor devices manufactured by or for STMicroelectronics.
  30. * 5. Redistribution and use of this software other than as permitted under
  31. * this license is void and will automatically terminate your rights under
  32. * this license.
  33. *
  34. * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
  35. * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
  36. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  37. * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
  38. * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
  39. * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  40. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  41. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  42. * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  43. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  44. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  45. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  46. *
  47. ******************************************************************************
  48. */
  49. /* USER CODE END Header */
  50. /* Includes ------------------------------------------------------------------*/
  51. #include "FreeRTOS.h"
  52. #include "task.h"
  53. #include "main.h"
  54. /* Private includes ----------------------------------------------------------*/
  55. /* USER CODE BEGIN Includes */
  56. /* USER CODE END Includes */
  57. /* Private typedef -----------------------------------------------------------*/
  58. /* USER CODE BEGIN PTD */
  59. /* USER CODE END PTD */
  60. /* Private define ------------------------------------------------------------*/
  61. /* USER CODE BEGIN PD */
  62. /* USER CODE END PD */
  63. /* Private macro -------------------------------------------------------------*/
  64. /* USER CODE BEGIN PM */
  65. /* USER CODE END PM */
  66. /* Private variables ---------------------------------------------------------*/
  67. /* USER CODE BEGIN Variables */
  68. /* USER CODE END Variables */
  69. /* Private function prototypes -----------------------------------------------*/
  70. /* USER CODE BEGIN FunctionPrototypes */
  71. /* USER CODE END FunctionPrototypes */
  72. /* GetIdleTaskMemory prototype (linked to static allocation support) */
  73. void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize );
  74. /* USER CODE BEGIN GET_IDLE_TASK_MEMORY */
  75. static StaticTask_t xIdleTaskTCBBuffer;
  76. static StackType_t xIdleStack[configMINIMAL_STACK_SIZE];
  77. void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize )
  78. {
  79. *ppxIdleTaskTCBBuffer = &xIdleTaskTCBBuffer;
  80. *ppxIdleTaskStackBuffer = &xIdleStack[0];
  81. *pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
  82. /* place for user code */
  83. }
  84. /* USER CODE END GET_IDLE_TASK_MEMORY */
  85. /* Private application code --------------------------------------------------*/
  86. /* USER CODE BEGIN Application */
  87. /* USER CODE END Application */
  88. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/