构建测试
This commit is contained in:
@@ -18,13 +18,12 @@
|
||||
#include "net_socket.h"
|
||||
#include "net_select.h"
|
||||
#include "ch395f.h"
|
||||
#include "ch395f_test.h"
|
||||
|
||||
#define DBG_TAG "[NET_TASK]"
|
||||
#include "dbg_log.h"
|
||||
|
||||
/* 测试缓冲大小定义(供各 Phase 测试使用) */
|
||||
#define NET_TASK_BUF_SIZE 65536
|
||||
/* 网络初始化完成标志(供 ch395f_test_task 等外部任务等待) */
|
||||
volatile uint8_t g_net_ready = 0;
|
||||
|
||||
/*
|
||||
* 函数功能:网络任务初始化
|
||||
@@ -72,6 +71,7 @@ void net_task_func(void const *arg)
|
||||
(phy == CH395F_PHY_10M_FULL) ? "10M FULL" :
|
||||
(phy == CH395F_PHY_10M_HALF) ? "10M HALF" :
|
||||
(phy == CH395F_PHY_DISCONN) ? "DISCONNECT" : "UNKNOWN");
|
||||
g_net_ready = 1;
|
||||
} else {
|
||||
DBG_ERROR("net init: FAIL");
|
||||
}
|
||||
@@ -82,36 +82,6 @@ void net_task_func(void const *arg)
|
||||
for (;;) {
|
||||
net_poll();
|
||||
net_process_messages();
|
||||
|
||||
/*
|
||||
* 以下测试共用 Socket 0(单连接模式):
|
||||
* Phase 4 — TCP Echo 基础收发
|
||||
* Phase 5 — 大文件传输
|
||||
* Phase 7 — Select/Poll
|
||||
* Phase 8 — 边界条件
|
||||
* Phase 10 — KeepAlive
|
||||
* 各 Phase 通过 ch395f_test.h 中的宏独立开关
|
||||
*/
|
||||
#ifdef ENABLE_PHASE4_TESTS
|
||||
ch395f_phase4_tests();
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_PHASE5_TESTS
|
||||
ch395f_phase5_tests();
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_PHASE7_TESTS
|
||||
ch395f_phase7_tests();
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_PHASE8_TESTS
|
||||
ch395f_phase8_tests();
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_PHASE10_TESTS
|
||||
ch395f_phase10_tests();
|
||||
#endif
|
||||
|
||||
osDelay(10);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user