feat add control_framework, socket connect OK and delete useless printf

This commit is contained in:
Liu_Weichao
2022-11-24 16:07:41 +08:00
parent f4b21208e8
commit ba31c9e0f8
5 changed files with 10 additions and 23 deletions

View File

@@ -164,7 +164,7 @@ void TcpSocketRecvTest(int argc, char *argv[])
}
#ifdef ADD_XIZI_FETURES
lwip_config_tcp(lwip_ipaddr, lwip_netmask, tcp_socket_ip);
lwip_config_tcp(0, lwip_ipaddr, lwip_netmask, tcp_socket_ip);
sys_thread_new("TcpSocketRecvTask", TcpSocketRecvTask, NULL, LWIP_TASK_STACK_SIZE, LWIP_DEMO_TASK_PRIO);
#endif
@@ -231,7 +231,7 @@ void TcpSocketSendTest(int argc, char *argv[])
}
#ifdef ADD_XIZI_FETURES
lwip_config_tcp(lwip_ipaddr, lwip_netmask, tcp_socket_ip);
lwip_config_tcp(0, lwip_ipaddr, lwip_netmask, tcp_socket_ip);
sys_thread_new("Tcp Socket Send", TcpSocketSendTask, NULL, LWIP_TASK_STACK_SIZE, LWIP_DEMO_TASK_PRIO);
#endif
#ifdef ADD_NUTTX_FETURES

View File

@@ -144,7 +144,7 @@ void UdpSocketRecvTest(int argc, char *argv[])
}
#ifdef ADD_XIZI_FETURES
lwip_config_tcp(lwip_ipaddr, lwip_netmask, udp_socket_ip);
lwip_config_tcp(0, lwip_ipaddr, lwip_netmask, udp_socket_ip);
sys_thread_new("UdpSocketRecvTask", UdpSocketRecvTask, NULL,
LWIP_TASK_STACK_SIZE, LWIP_DEMO_TASK_PRIO);
#endif
@@ -207,7 +207,7 @@ void UdpSocketSendTest(int argc, char *argv[])
}
#ifdef ADD_XIZI_FETURES
lwip_config_tcp(lwip_ipaddr, lwip_netmask, udp_socket_ip);
lwip_config_tcp(0, lwip_ipaddr, lwip_netmask, udp_socket_ip);
sys_thread_new("UdpSocketSendTask", UdpSocketSendTask, NULL, LWIP_TASK_STACK_SIZE,
LWIP_DEMO_TASK_PRIO);
#endif

View File

@@ -22,6 +22,7 @@
void ControlOmronTest(void)
{
int i = 0;
uint16_t read_data_length = 0;
uint8_t read_data[1024] = {0};
ControlProtocolType fins_protocol = ControlProtocolFind();
@@ -35,11 +36,11 @@ void ControlOmronTest(void)
if (CONTROL_REGISTERED == fins_protocol->protocol_status) {
ControlProtocolOpen(fins_protocol);
PrivTaskDelay(10000);
for (int i = 0; i < 10; i ++) {
for (;;) {
read_data_length = ControlProtocolRead(fins_protocol, read_data, sizeof(read_data));
printf("%s read [%d] fins data %d using receipe file\n", __func__, i, read_data_length);
i++;
PrivTaskDelay(100000);
}
//ControlProtocolClose(fins_protocol);