Files
STM32F4-Base/App/task/net_task.h
2026-08-24 16:16:18 +08:00

32 lines
903 B
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* 模块名称Network Application Task
* 模块功能网络协议栈初始化、轮询、TCP/UDP 业务处理
* 适用平台STM32F407ZGTx + CH395F
* 作者:王建锋
* 创建日期2026-07-19
* 修改记录:
* v1.0 2026-07-19 王建锋 创建初始版本
* v1.1 2026-08-24 王建锋 提取 net_stack_bring_up() 供硬件层/NET 层两种测试模式共用
*/
#ifndef __NET_TASK_H
#define __NET_TASK_H
#ifdef __cplusplus
extern "C" {
#endif
/* CH395F 协议栈一次性初始化net_init + MAC 打印 + PHY 配置 + g_net_ready 置位)。
* 返回 0 成功 / -1 失败。NET 层模式由 netTask 调用;硬件层模式(阶段 1~5
* netTask 不创建,由 ch395fTestTask 调用后独占 CH395F。 */
int net_stack_bring_up(void);
int net_task_init(void);
void net_task_func(void const *arg);
#ifdef __cplusplus
}
#endif
#endif /* __NET_TASK_H */