Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of WIZnetInterface by
Diff: arch/int/W7500x_toe.cpp
- Revision:
- 30:6feeaebad180
- Parent:
- 29:c91884bd2713
- Child:
- 31:f6a5f6d1978b
--- a/arch/int/W7500x_toe.cpp Tue Nov 17 06:35:55 2015 +0000
+++ b/arch/int/W7500x_toe.cpp Fri Nov 04 02:28:28 2016 +0000
@@ -22,7 +22,7 @@
#include "mbed_debug.h"
#include "DNSClient.h"
-
+//Serial pc2(PA_13,PA_14);
/*
* MDIO via GPIO
* mdio via gpio is supported and related functions as follows.
@@ -89,6 +89,11 @@
return true;
}
+bool WIZnet_Chip::disconnect()
+{
+ return true;
+}
+
bool WIZnet_Chip::setProtocol(int socket, Protocol p)
{
if (socket < 0) {
@@ -149,12 +154,17 @@
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
@@ -199,11 +209,14 @@
bool WIZnet_Chip::close(int socket)
{
+ //pc2.printf("-----------------------------------2222-------------------------------------***\r\n");
if (socket < 0) {
+ //pc2.printf("---------------return false1--------***\r\n");
return false;
}
// if SOCK_CLOSED, return
if (sreg<uint8_t>(socket, Sn_SR) == SOCK_CLOSED) {
+ //pc2.printf("---------------return true1--------***\r\n");
return true;
}
// if SOCK_ESTABLISHED, send FIN-Packet to peer
@@ -214,6 +227,7 @@
scmd(socket, CLOSE);
// clear Socket Interrupt Register
sreg<uint8_t>(socket, Sn_ICR, 0xff);
+ //pc2.printf("---------------return true2--------***\r\n");
return true;
}
