开启 ThreadX
All checks were successful
Build and Upload Artifact / build and upload-artifact (push) Successful in 25m8s

This commit is contained in:
chauyin
2025-05-07 22:53:45 +08:00
parent 7f9bede0c7
commit 559760be0c
194 changed files with 42018 additions and 91 deletions

View File

@@ -17,6 +17,7 @@
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "app_threadx.h"
#include "main.h"
#include "memorymap.h"
#include "tim.h"
@@ -95,6 +96,8 @@ int main(void)
/* USER CODE END 2 */
MX_ThreadX_Init();
/* Initialize leds */
BSP_LED_Init(LED_GREEN);
BSP_LED_Init(LED_YELLOW);
@@ -114,6 +117,8 @@ int main(void)
Error_Handler();
}
/* We should never get here as control is now taken by the scheduler */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
AppStart();
@@ -187,6 +192,28 @@ void SystemClock_Config(void)
/* USER CODE END 4 */
/**
* @brief Period elapsed callback in non blocking mode
* @note This function is called when TIM1 interrupt took place, inside
* HAL_TIM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment
* a global variable "uwTick" used as application time base.
* @param htim : TIM handle
* @retval None
*/
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
/* USER CODE BEGIN Callback 0 */
/* USER CODE END Callback 0 */
if (htim->Instance == TIM1)
{
HAL_IncTick();
}
/* USER CODE BEGIN Callback 1 */
/* USER CODE END Callback 1 */
}
/**
* @brief This function is executed in case of error occurrence.
* @retval None