网络主要内容测试完成

This commit is contained in:
2026-08-26 13:54:52 +08:00
parent 0a707034cc
commit 88160a5134
18 changed files with 2174 additions and 928 deletions

View File

@@ -925,7 +925,7 @@ uint8_t ch395f_get_dhcp_status(void) {
/*
* 函数功能设置Socket协议类型
* 入口参数sock - Socket索引 uint8_t 0 - 3
* 入口参数sock - Socket索引 uint8_t 0 - 7
* proto - 协议类型 uint8_t CH395F_PROTO_TYPE_xxx
* 限定条件Socket必须处于关闭状态
*/
@@ -948,7 +948,7 @@ void ch395f_set_proto_type(uint8_t sock, uint8_t proto) {
/*
* 函数功能设置Socket目标IP地址
* 入口参数sock - Socket索引 uint8_t 0 - 3
* 入口参数sock - Socket索引 uint8_t 0 - 7
* p_ip - 4字节目标IP指针 uint8_t*
* 限定条件p_ip不可为NULL
*/
@@ -980,7 +980,7 @@ void ch395f_set_des_ip(uint8_t sock, uint8_t *p_ip) {
/*
* 函数功能设置Socket目标端口小端格式
* 入口参数sock - Socket索引 uint8_t 0 - 3
* 入口参数sock - Socket索引 uint8_t 0 - 7
* port - 目标端口号 uint16_t
*/
void ch395f_set_des_port(uint8_t sock, uint16_t port) {
@@ -1005,7 +1005,7 @@ void ch395f_set_des_port(uint8_t sock, uint16_t port) {
/*
* 函数功能设置Socket源端口小端格式
* 入口参数sock - Socket索引 uint8_t 0 - 3
* 入口参数sock - Socket索引 uint8_t 0 - 7
* port - 源端口号 uint16_t
*/
void ch395f_set_sour_port(uint8_t sock, uint16_t port) {
@@ -1105,7 +1105,7 @@ uint8_t ch395f_tcp_disconnect(uint8_t sock) {
/*
* 函数功能向Socket发送缓冲区写入数据DMA批量传输
* 入口参数sock - Socket索引 uint8_t 0 - 3
* 入口参数sock - Socket索引 uint8_t 0 - 7
* p_data - 数据指针 uint8_t*
* len - 数据长度 uint16_t
* 限定条件1. p_data不可为NULL
@@ -1149,7 +1149,7 @@ void ch395f_write_send_buf(uint8_t sock, uint8_t *p_data, uint16_t len) {
/*
* 函数功能从Socket接收缓冲区读取数据DMA批量传输
* 入口参数sock - Socket索引 uint8_t 0 - 3
* 入口参数sock - Socket索引 uint8_t 0 - 7
* p_data - 输出缓冲区指针 uint8_t*
* len - 待读取数据长度 uint16_t
* 限定条件1. p_data不可为NULL
@@ -1193,8 +1193,8 @@ void ch395f_read_recv_buf(uint8_t sock, uint8_t *p_data, uint16_t len) {
/*
* 函数功能获取Socket接收缓冲区中数据长度
* 入口参数sock - Socket索引 uint8_t 0 - 3
* 返回值:接收数据长度 uint16_t
* 入口参数sock - Socket索引 uint8_t 0 - 7
* 返回值:接收数据长度 uint16_t,实际上 ch395F 接收缓冲区最大也就 8192
* 限定条件Socket必须已打开
*/
uint16_t ch395f_get_recv_len(uint8_t sock) {