SNIC UART Interface library: Serial to Wi-Fi library for Murata TypeYD Wi-Fi module. For more information about TypeYD: http://www.murata.co.jp/products/microwave/module/lbwb1zzydz/index.html
Dependents: SNIC-xively-jumpstart-demo SNIC-FluentLogger-example TCPEchoServer murataDemo ... more
Fork of YDwifiInterface by
Revision 50:cd632a13e4dc, committed 2015-03-31
- Comitter:
- MACRUM
- Date:
- Tue Mar 31 02:53:44 2015 +0000
- Parent:
- 49:3376556ba6ad
- Child:
- 51:69a9cf901d54
- Commit message:
- Fixed: NTPClient library compatibility. https://developer.mbed.org/users/ban4jp/code/SNICInterface_PullReq/rev/e1cb45f7a27f
Changed in this revision
| Socket/Socket.h | Show annotated file Show diff for this revision Revisions of this file |
| Socket/UDPSocket.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Socket/Socket.h Tue Mar 31 02:50:55 2015 +0000 +++ b/Socket/Socket.h Tue Mar 31 02:53:44 2015 +0000 @@ -24,6 +24,11 @@ #include "SNIC_Core.h" #include "SNIC_UartMsgUtil.h" +#define htons(x) __REV16(x) +#define ntohs(x) __REV16(x) +#define htonl(x) __REV(x) +#define ntohl(x) __REV(x) + typedef unsigned long socklen_t; /** Socket file descriptor and select wrapper
--- a/Socket/UDPSocket.cpp Tue Mar 31 02:50:55 2015 +0000
+++ b/Socket/UDPSocket.cpp Tue Mar 31 02:53:44 2015 +0000
@@ -303,9 +303,17 @@
con_info_p->mutex.lock();
con_info_p->is_receive_complete = true;
con_info_p->mutex.unlock();
- while( con_info_p->is_received == false )
+ if( con_info_p->is_received == false )
{
+ // Try receive
Thread::yield();
+
+ if( con_info_p->is_received == false )
+ {
+ // No data received.
+ FUNC_OUT();
+ return 0;
+ }
}
// Get packet data from buffer for receive.
int i;
muRata

Murata TypeYD