时间同步已经完成

This commit is contained in:
2026-08-28 16:42:44 +08:00
parent 615a9b13e9
commit 4e9ac0d9c3
20 changed files with 771 additions and 1282 deletions

View File

@@ -36,6 +36,7 @@
#include "lftpd.h"
#include "../test/ch395f_test_task.h"
#include "../test/ch395f_test.h" /* ENABLE_NET_LAYER_TESTSnetTask 条件创建 */
#include "time_sync.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
@@ -55,6 +56,12 @@
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN Variables */
/* 存储测试变量g_storage_stats / s_perf_buf已迁至 test/storage_test_task.c */
osThreadId_t timeSyncTaskHandle;
const osThreadAttr_t timeSyncTask_attributes = {
.name = "timeSyncTask",
.stack_size = 512 * 4,
.priority = (osPriority_t) osPriorityNormal,
};
/* USER CODE END Variables */
/* Definitions for defaultTask */
osThreadId_t defaultTaskHandle;
@@ -141,6 +148,8 @@ void MX_FREERTOS_Init(void) {
/* creation of ftpTask */
ftpTaskHandle = osThreadNew(StartFtpTask, NULL, &ftpTask_attributes);
/* creation of ch395fTestTask */
ch395fTestTaskHandle = osThreadNew(StartCh395fTestTask, NULL, &ch395fTestTask_attributes);
@@ -150,6 +159,9 @@ void MX_FREERTOS_Init(void) {
/* NET 层测试模式(阶段 6~10完整网络栈netTask 负责轮询与消息处理 */
netTaskHandle = osThreadNew(StartNetTask, NULL, &netTask_attributes);
#endif
/* 本地时间同步任务PC 推送 TCP依赖 netTask 处理消息队列 */
timeSyncTaskHandle = osThreadNew(timeSyncTask, NULL, &timeSyncTask_attributes);
/* USER CODE END RTOS_THREADS */
/* USER CODE BEGIN RTOS_EVENTS */