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.
Dependents: LPC11U68_NTPClient_HelloWorld_WIZ550io
Fork of WIZ550ioInterface by
Revision 11:5a5a3f373a6b, committed 2014-07-08
- Comitter:
- Bongjun
- Date:
- Tue Jul 08 03:49:33 2014 +0000
- Parent:
- 10:4da8370d14da
- Commit message:
- update some code after comparing WIZnet Library
Changed in this revision
--- a/Socket/Socket.cpp Tue Jul 08 01:04:09 2014 +0000
+++ b/Socket/Socket.cpp Tue Jul 08 03:49:33 2014 +0000
@@ -21,7 +21,7 @@
Socket::Socket() : _sock_fd(-1),_blocking(true), _timeout(1500) {
eth = WIZ820io::getInstance();
if (eth == NULL) {
- error("Socket constructor error: no WIZ8820io instance available!\r\n");
+ error("Socket constructor error: no W5500 instance available!\r\n");
}
}
--- a/Socket/UDPSocket.cpp Tue Jul 08 01:04:09 2014 +0000
+++ b/Socket/UDPSocket.cpp Tue Jul 08 03:49:33 2014 +0000
@@ -24,12 +24,14 @@
{
}
+// After init function, bind() should be called.
int UDPSocket::init(void)
{
if (_sock_fd < 0) {
_sock_fd = eth->new_socket();
}
- eth->setProtocol(_sock_fd, UDP);
+// eth->setProtocol(_sock_fd, UDP);
+ if (eth->setProtocol(_sock_fd, UDP) == false) return -1;
return 0;
}
--- a/WIZ820io/WIZ820io.h Tue Jul 08 01:04:09 2014 +0000
+++ b/WIZ820io/WIZ820io.h Tue Jul 08 03:49:33 2014 +0000
@@ -103,7 +103,8 @@
*
* @return true if connected, false otherwise
*/
- bool join();
+ bool join(); // not WiFi? join???
+ //boot setip(); // much better to use..
/*
* Initialize the WIZ820io module with static values.
