C#里与嵌入式系统W5500网络通讯(7)
前面已经介绍怎么样初始化W5500的芯片,
接着下来就是怎么样对socket进行使用了。
一般情况下socket会有以下状态:
对应的W5500寄存器也有如下定义:
/* Sn_SR values */
/*** @brief Closed* @details This indicates that Socket n is released.\n* When DICON, CLOSE command is ordered, or when a timeout occurs, it is changed to @ref SOCK_CLOSED regardless of previous status.*/
#define SOCK_CLOSED 0x00/*** @brief Initiate state* @details This indicates Socket n is opened with TCP mode.\n* It is changed to @ref SOCK_INIT when @ref Sn_MR(P[3:0]) = 001 and OPEN command is ordered.\n* After @