support PLC bus and clean codes

This commit is contained in:
wlyu
2022-02-15 17:40:40 +08:00
parent a101e994ff
commit 5185501d72
16 changed files with 200 additions and 680 deletions
@@ -17,6 +17,7 @@
* @author AIIT XUOS Lab
* @date 2021-05-29
*/
#include <transform.h>
#include <xiuos.h>
#include "board.h"
@@ -24,25 +25,11 @@
#include <lwip/sockets.h>
#include "lwip/sys.h"
/*******************************************************************************
* Definitions
******************************************************************************/
#define TCP_DEMO_BUF_SIZE 65535
/*******************************************************************************
* Prototypes
******************************************************************************/
/*******************************************************************************
* Variables
******************************************************************************/
char tcp_socket_ip[] = {192, 168, 250, 252};
/*******************************************************************************
* Code
******************************************************************************/
/******************************************************************************/
static void TCPSocketRecvTask(void *arg)
{
@@ -26,27 +26,14 @@
#include <lwip/sockets.h>
#include "lwip/sys.h"
/*******************************************************************************
* Definitions
******************************************************************************/
#define UDP_BUF_SIZE 65536
/*******************************************************************************
* Prototypes
******************************************************************************/
/*******************************************************************************
* Variables
******************************************************************************/
extern char udp_target[];
static struct udp_pcb *udpecho_raw_pcb;
char udp_socket_ip[] = {192, 168, 250, 252};
/*******************************************************************************
* Code
******************************************************************************/
/******************************************************************************/
static void UdpSocketRecvTask(void *arg)
{
lw_print("UdpSocketRecvTask start.\n");