网络主要内容测试完成
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user