Transfer data between UART ports and Ethernet.

Dependencies:   BufferedSerial

Transfer data between UART ports and Ethernet.

  • Support multiple UART ports.
  • Support fixed IP address and DHCP.
  • Support TCP server and TCP client modes.
  • Support a simple web server for UART and Ethernet configuration.
Revision:
5:7e7ad7c079fe
Parent:
2:35f2cc8b05fa
Child:
6:dc9f344f4bf0
--- a/main.cpp	Mon Oct 16 02:07:58 2017 +0000
+++ b/main.cpp	Fri Apr 20 10:51:28 2018 +0000
@@ -26,9 +26,9 @@
 S_NET_CONFIG net_config = {IP_STATIC_MODE, IP_ADDRESS, NETWORK_MASK, GATEWAY_ADDRESS};
 
 #if defined (TARGET_NUMAKER_PFM_M487)
-BufferedSerial serial_0(PH_8, PH_9, 256, 4);    // UART1
+BufferedSerial serial_0(PB_3, PB_2, 256, 4);    // UART1
 BufferedSerial serial_1(PA_5, PA_4, 256, 4);    // UART5
-//BufferedSerial serial_2(PC_12, PC_11, 256, 4);  // UART0, Debug
+//BufferedSerial serial_2(PB_13, PB_12, 256, 4);  // UART0, Debug
 
 #elif defined (TARGET_NUMAKER_PFM_NUC472)
 BufferedSerial serial_0(PH_1, PH_0, 256, 4);    // UART4
@@ -301,7 +301,7 @@
     
     eth.connect();
     printf("IP Address is %s\r\n", eth.get_ip_address());
-    
+
     Thread thread[MAX_UART_PORTS];
     
     // Folk thread for each port