yangyang
Fork of WIZnetInterface by
Revision 32:26fc4b6c5784, committed 2016-11-09
- Comitter:
- 846354866
- Date:
- Wed Nov 09 09:23:14 2016 +0000
- Parent:
- 31:f6a5f6d1978b
- Commit message:
- sensor iot for espressif(no chinese) version0.1
Changed in this revision
diff -r f6a5f6d1978b -r 26fc4b6c5784 Socket/DNSClient.cpp --- a/Socket/DNSClient.cpp Fri Nov 04 12:09:25 2016 +0000 +++ b/Socket/DNSClient.cpp Wed Nov 09 09:23:14 2016 +0000 @@ -113,7 +113,7 @@ m_udp->init(); m_udp->set_blocking(false); Endpoint server; - server.set_address("8.8.8.8", 53); // DNS + server.set_address("223.5.5.5", 53); // DNS m_udp->bind(rand()&0x7fff); uint8_t buf[256]; int size = query(buf, sizeof(buf), hostname);
diff -r f6a5f6d1978b -r 26fc4b6c5784 Socket/TCPSocketConnection.cpp --- a/Socket/TCPSocketConnection.cpp Fri Nov 04 12:09:25 2016 +0000 +++ b/Socket/TCPSocketConnection.cpp Wed Nov 09 09:23:14 2016 +0000 @@ -43,7 +43,7 @@ if (!eth->connect(_sock_fd, get_address(), port)) {//should jion the timeout return -1; } - set_blocking(false); + // add code refer from EthernetInterface. _is_connected = true;
diff -r f6a5f6d1978b -r 26fc4b6c5784 arch/int/W7500x_toe.h --- a/arch/int/W7500x_toe.h Fri Nov 04 12:09:25 2016 +0000 +++ b/arch/int/W7500x_toe.h Wed Nov 09 09:23:14 2016 +0000 @@ -237,9 +237,16 @@ buf[sizeof(buf)-1-i] = t; } */ + //unsigned char delay_t = 200; + //Serial pc(PA_13,PA_14); for(int i = 0; i < sizeof(buf); i++) { // Little Endian to Big Endian *(volatile uint8_t *)(W7500x_WZTOE_BASE + (uint32_t)((cb<<16)+addr)+i) = buf[i]; + wait(0.001f); + //while(delay_t--); + //delay_t = 200;//pc.printf("%s():%d--buf[%d]\n",__FUNCTION__, __LINE__,i); } + //delay_t = 200;//pc.printf("%s():%d--buf[%d]\n",__FUNCTION__, __LINE__,i); + //while(delay_t--); } template<typename T> @@ -252,6 +259,7 @@ uint8_t buf[sizeof(T)] = {0,}; for(int i = 0; i < sizeof(buf); i++) { // Little Endian to Big Endian buf[i] = *(volatile uint8_t *)(W7500x_WZTOE_BASE + (uint32_t)((cb<<16)+addr)+i); + wait(0.001f); } /* for(int i = 0; i < sizeof(buf)/2; i++) { // Big Endian to Little Endian