freertos.c 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * File Name : freertos.c
  5. * Description : Code for freertos applications
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under Ultimate Liberty license
  13. * SLA0044, the "License"; You may not use this file except in compliance with
  14. * the License. You may obtain a copy of the License at:
  15. * www.st.com/SLA0044
  16. *
  17. ******************************************************************************
  18. */
  19. /* USER CODE END Header */
  20. /* Includes ------------------------------------------------------------------*/
  21. #include "FreeRTOS.h"
  22. #include "task.h"
  23. #include "main.h"
  24. /* Private includes ----------------------------------------------------------*/
  25. /* USER CODE BEGIN Includes */
  26. #include "admisc/ad0x0_perf.h"
  27. /* USER CODE END Includes */
  28. /* Private typedef -----------------------------------------------------------*/
  29. /* USER CODE BEGIN PTD */
  30. /* USER CODE END PTD */
  31. /* Private define ------------------------------------------------------------*/
  32. /* USER CODE BEGIN PD */
  33. /* USER CODE END PD */
  34. /* Private macro -------------------------------------------------------------*/
  35. /* USER CODE BEGIN PM */
  36. /* USER CODE END PM */
  37. /* Private variables ---------------------------------------------------------*/
  38. /* USER CODE BEGIN Variables */
  39. /* USER CODE END Variables */
  40. /* Private function prototypes -----------------------------------------------*/
  41. /* USER CODE BEGIN FunctionPrototypes */
  42. /* USER CODE END FunctionPrototypes */
  43. /* Hook prototypes */
  44. void vApplicationIdleHook(void);
  45. void vApplicationTickHook(void);
  46. /* USER CODE BEGIN 2 */
  47. void vApplicationIdleHook( void )
  48. {
  49. /* vApplicationIdleHook() will only be called if configUSE_IDLE_HOOK is set
  50. to 1 in FreeRTOSConfig.h. It will be called on each iteration of the idle
  51. task. It is essential that code added to this hook function never attempts
  52. to block in any way (for example, call xQueueReceive() with a block time
  53. specified, or call vTaskDelay()). If the application makes use of the
  54. vTaskDelete() API function (as this demo application does) then it is also
  55. important that vApplicationIdleHook() is permitted to return to its calling
  56. function, because it is the responsibility of the idle task to clean up
  57. memory allocated by the kernel to any task that has since been deleted. */
  58. ad0x0_perf_tick_idle();
  59. extern uint8_t ad0x0_perf;
  60. ad0x0_perf=ad0x0_get_perf();
  61. }
  62. /* USER CODE END 2 */
  63. /* USER CODE BEGIN 3 */
  64. void vApplicationTickHook( void )
  65. {
  66. /* This function will be called by each tick interrupt if
  67. configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be
  68. added here, but the tick hook is called from an interrupt context, so
  69. code must not attempt to block, and only the interrupt safe FreeRTOS API
  70. functions can be used (those that end in FromISR()). */
  71. }
  72. /* USER CODE END 3 */
  73. /* Private application code --------------------------------------------------*/
  74. /* USER CODE BEGIN Application */
  75. /* USER CODE END Application */
  76. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/