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

Revision:
3:f885a548a5ac
Parent:
1:1c1802ec42a2
--- 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());