add tick hook

This commit is contained in:
不吃油炸鸡
2025-08-12 18:47:42 +08:00
parent 6107c6ffde
commit 7482557df4

View File

@@ -64,6 +64,21 @@ void StartDefaultTask(void *argument);
void MX_FREERTOS_Init(void); /* (MISRA C 2004 rule 8.1) */
/* Hook prototypes */
void vApplicationTickHook(void);
/* USER CODE BEGIN 3 */
void vApplicationTickHook( void )
{
/* This function will be called by each tick interrupt if
configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be
added here, but the tick hook is called from an interrupt context, so
code must not attempt to block, and only the interrupt safe FreeRTOS API
functions can be used (those that end in FromISR()). */
TaskTickHook();
}
/* USER CODE END 3 */
/**
* @brief FreeRTOS initialization
* @param None