yangyang

Dependents:   espyun espyun

Fork of WIZnetInterface by jiang hao

Files at this revision

API Documentation at this revision

Comitter:
846354866
Date:
Fri Nov 04 12:09:25 2016 +0000
Parent:
30:6feeaebad180
Child:
32:26fc4b6c5784
Commit message:
sensor iot for espressif(no chinese) version0.1

Changed in this revision

Socket/TCPSocketConnection.cpp Show annotated file Show diff for this revision Revisions of this file
arch/ext/W5500.cpp Show annotated file Show diff for this revision Revisions of this file
arch/int/W7500x_toe.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Socket/TCPSocketConnection.cpp	Fri Nov 04 02:28:28 2016 +0000
+++ b/Socket/TCPSocketConnection.cpp	Fri Nov 04 12:09:25 2016 +0000
@@ -31,22 +31,16 @@
 
 int TCPSocketConnection::connect(const char* host, const int port)
 {
-    Serial pc5(PA_13,PA_14);
-    pc5.baud(115200);
-    pc5.printf("in connect\r\n");
     if (_sock_fd < 0) {
         _sock_fd = eth->new_socket();
         if (_sock_fd < 0) {
-            pc5.printf("in connect 1 return -1\r\n");
             return -1;
         }
     }
     if (set_address(host, port) != 0) {
-  		pc5.printf("in connect 2 return -1\r\n");
         return -1;
     }
     if (!eth->connect(_sock_fd, get_address(), port)) {//should jion the timeout
-        pc5.printf("in connect 3 return -1\r\n");
         return -1;
     }
     set_blocking(false);
@@ -58,9 +52,6 @@
 
 bool TCPSocketConnection::is_connected(void)
 {
-    Serial pc2(PA_13,PA_14);
-    pc2.baud(115200);
-    pc2.printf("in is_connected()\r\n");
     // force update recent state.
     _is_connected = eth->is_connected(_sock_fd);
     return _is_connected;
--- a/arch/ext/W5500.cpp	Fri Nov 04 02:28:28 2016 +0000
+++ b/arch/ext/W5500.cpp	Fri Nov 04 12:09:25 2016 +0000
@@ -139,9 +139,6 @@
 
 bool WIZnet_Chip::is_connected(int socket)
 {
-    Serial pc3(PA_13,PA_14);
-    pc3.baud(115200);
-    pc3.printf("in is_connected(fd)\r\n");
     /*
         if (sreg<uint8_t>(socket, Sn_SR) == SOCK_ESTABLISHED) {
             return true;
--- a/arch/int/W7500x_toe.cpp	Fri Nov 04 02:28:28 2016 +0000
+++ b/arch/int/W7500x_toe.cpp	Fri Nov 04 12:09:25 2016 +0000
@@ -154,17 +154,14 @@
 	   return true;
 	   }
 	 */
-	Serial pc4(PA_13,PA_14);
-	pc4.baud(115200);
-	pc4.printf("in isconnected4\r\n");
+	
 	uint8_t tmpSn_SR;
 	tmpSn_SR = sreg<uint8_t>(socket, Sn_SR);
 	// packet sending is possible, when state is SOCK_CLOSE_WAIT.
 	if ((tmpSn_SR == SOCK_ESTABLISHED) || (tmpSn_SR == SOCK_CLOSE_WAIT)) {
-		pc4.printf("return true\r\n");
 		return true;
 	}
-	pc4.printf("return false\r\n");
+	
 	return false;
 }
 // Reset the chip & set the buffer