MQTT client test with W5200 ethernet shield
Dependents: IBMIoTClientEthernetExample_W5200
Fork of W5500Interface by
Diff: WIZnet/W5500.cpp
- Revision:
- 5:8aefaef88f79
- Parent:
- 3:a5d99521e9cc
- Child:
- 7:da52bf0e0e5d
diff -r af0ed4fbca02 -r 8aefaef88f79 WIZnet/W5500.cpp --- a/WIZnet/W5500.cpp Mon Sep 01 01:54:29 2014 +0000 +++ b/WIZnet/W5500.cpp Fri Sep 26 08:05:41 2014 +0000 @@ -7,7 +7,7 @@ #ifdef USE_W5500 //Debug is disabled by default -#if 0 +#if 1 #define DBG(...) do{debug("%p %d %s ", this,__LINE__,__PRETTY_FUNCTION__); debug(__VA_ARGS__); } while(0); //#define DBG(x, ...) debug("[W5500:DBG]"x"\r\n", ##__VA_ARGS__); #define WARN(x, ...) debug("[W5500:WARN]"x"\r\n", ##__VA_ARGS__); @@ -63,6 +63,15 @@ return true; } +bool WIZnet_Chip::linkstatus() +{ + if ( (reg_rd<uint8_t>(PHYCFGR) & 0x01) != 0x01 ) + return false; + + return true; +} + + bool WIZnet_Chip::setProtocol(int socket, Protocol p) { if (socket < 0) {