WebSocket Ethernet HelloWorld for WIZnet W5500 chip. It uses "W5500Interface" for Ethernet Interface Library.

Dependencies:   W5500Interface WebSocketClient mbed-rtos mbed

Fork of Websocket_Ethernet_HelloWorld by Samuel Mokrani

Files at this revision

API Documentation at this revision

Comitter:
Bongjun
Date:
Wed Aug 27 10:03:32 2014 +0000
Parent:
2:00da1457c871
Commit message:
Websocket_Ethernet_HelloWorld for W5500 (WIZnet) - minimum change

Changed in this revision

EthernetInterface.lib Show diff for this revision Revisions of this file
W5500Interface.lib Show annotated file Show diff for this revision Revisions of this file
WebSocketClient.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 00da1457c871 -r f885a548a5ac EthernetInterface.lib
--- a/EthernetInterface.lib	Thu Aug 23 14:11:49 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/mbed_official/code/EthernetInterface/#0d9ae7845bfe
diff -r 00da1457c871 -r f885a548a5ac W5500Interface.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/W5500Interface.lib	Wed Aug 27 10:03:32 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/teams/EthernetInterfaceW5500-makers/code/W5500Interface/#a5d99521e9cc
diff -r 00da1457c871 -r f885a548a5ac WebSocketClient.lib
--- a/WebSocketClient.lib	Thu Aug 23 14:11:49 2012 +0000
+++ b/WebSocketClient.lib	Wed Aug 27 10:03:32 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/samux/code/WebSocketClient/#466f90b7849a
+http://mbed.org/users/samux/code/WebSocketClient/#4567996414a5
diff -r 00da1457c871 -r f885a548a5ac main.cpp
--- a/main.cpp	Thu Aug 23 14:11:49 2012 +0000
+++ b/main.cpp	Wed Aug 27 10:03:32 2014 +0000
@@ -6,7 +6,24 @@
 int main() {
     char recv[30];
  
-    EthernetInterface eth;
+//    EthernetInterface eth;
+// change for W5500 interface.
+#if defined(TARGET_LPC1114)
+    SPI spi(dp2, dp1, dp6); // mosi, miso, sclk
+    EthernetInterface eth(&spi, dp25, dp26); // spi, cs, reset
+
+#elif defined(TARGET_LPC1768)
+    SPI spi(p11, p12, p13); // mosi, miso, sclk
+    EthernetInterface eth(&spi, p14, p15); // spi, cs, reset
+
+#elif defined(TARGET_LPC11U68)
+    SPI spi(P0_9, P0_8, P1_29); // mosi, miso, sclk
+    EthernetInterface eth(&spi, P0_2, P1_28);//, nRESET(p9); // reset pin is dummy, don't affect any pin of WIZ550io
+    spi.format(8,0); // 8bit, mode 0
+    spi.frequency(7000000); // 7MHz
+    wait(1); // 1 second for stable state
+#endif
+    
     eth.init(); //Use DHCP
     eth.connect();
     printf("IP Address is %s\n\r", eth.getIPAddress());
diff -r 00da1457c871 -r f885a548a5ac mbed-rtos.lib
--- a/mbed-rtos.lib	Thu Aug 23 14:11:49 2012 +0000
+++ b/mbed-rtos.lib	Wed Aug 27 10:03:32 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed-rtos/#70bd33086f56
+http://mbed.org/users/mbed_official/code/mbed-rtos/#bd07334df5b1
diff -r 00da1457c871 -r f885a548a5ac mbed.bld
--- a/mbed.bld	Thu Aug 23 14:11:49 2012 +0000
+++ b/mbed.bld	Wed Aug 27 10:03:32 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/10b9abbe79a6
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013
\ No newline at end of file