Fixing w5500.

This commit is contained in:
TXuian 2022-12-10 12:57:51 +08:00
parent 03c186be94
commit f71faeff7f
1 changed files with 2 additions and 1 deletions

View File

@ -326,6 +326,7 @@ void wiz_client_op_test(int argc, char *argv[]) {
KPrintf("[W5500 Client] wiz client to %d.%d.%d.%d:%d\n", ip[0], ip[1], ip[2],
ip[3], port);
uint8_t buf[g_wiznet_buf_size];
memset(buf, '\0', g_wiznet_buf_size);
memcpy(buf, argv[3], strlen(argv[3]));
KPrintf("[W5500 Client] BUFFER: %s\n", buf);
while (1) {
@ -335,7 +336,7 @@ void wiz_client_op_test(int argc, char *argv[]) {
KPrintf("[W5500] Client Op Failed.\n");
}
MdelayKTask(10);
memset(buf, 0, g_wiznet_buf_size);
memset(buf, '\0', g_wiznet_buf_size);
// waiting for a responding.
ret =
wiz_client_op(client_sock, buf, g_wiznet_buf_size, ip, port, RECV_DATA);