optimize control framework using socket, support LwIP and W5500(need to add init/socket apis)

This commit is contained in:
Liu_Weichao
2023-01-06 17:25:11 +08:00
parent 9ad282c39e
commit f8b845ca62
10 changed files with 72 additions and 20 deletions

View File

@@ -24,20 +24,30 @@
#include <transform.h>
#include <list.h>
#ifdef CONTROL_USING_SOCKET
#ifdef BSP_USING_LWIP
#include "lwip/sys.h"
#include "lwip/sockets.h"
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef CONTROL_USING_SOCKET
#ifdef BSP_USING_LWIP
#define socket_write lwip_write
#define socket_read lwip_read
#endif
#ifdef BSP_USING_W5500
//to do
#define socket_write
#define socket_read
#endif
#endif
/*Control Framework Socket Init*/
void SocketInit(char *ip, char *mask, char *gw);