offset value is ok, but set_time is not working. on going...

Dependencies:   NTPClient WIZ550ioInterface mbed

Fork of NTPClient_HelloWorld_WIZ550io by ban4jp -

Revision:
3:c6741dc3b6c0
Parent:
2:bf7dc5f5bca9
Child:
4:25394528b7a6
--- a/main.cpp	Sun Aug 05 16:17:31 2012 +0000
+++ b/main.cpp	Mon Dec 23 14:42:34 2013 +0000
@@ -1,15 +1,46 @@
 #include "mbed.h"
-#include "EthernetInterface.h"
+//#include "EthernetInterface.h"
+#include "WIZ550ioInterface.h"
 #include "NTPClient.h"
 
-EthernetInterface eth;
+//EthernetInterface eth;
+#if defined(TARGET_LPC1114)
+SPI spi(dp2, dp1, dp6); // mosi, miso, sclk
+WIZ550ioInterface eth(&spi, dp25, dp26); // spi, cs, reset
+
+#elif defined(TARGET_LPC1768)
+SPI spi(p11, p12, p13); // mosi, miso, sclk
+WIZ550ioInterface eth(&spi, p14, p15); // spi, cs, reset
+
+#endif
+
 NTPClient ntp;
 
 int main() 
 {
-    eth.init(); //Use DHCP
+    int ret = eth.init(); //Use DHCP
+    if (!ret)
+    {
+      printf("Initialized, MAC: %s\n", eth.getMACAddress());
+    }
+    else
+    {
+      printf("Error eth.init() - ret = %d\n", ret);
+      return -1;
+    }
 
-    eth.connect();
+    ret = eth.connect();
+    if (!ret)
+    {
+      printf("Connected, IP: %s, MASK: %s, GW: %s\n",
+        eth.getIPAddress(), eth.getNetworkMask(), eth.getGateway());
+    }
+    else
+    {
+      printf("Error eth.connect() - ret = %d\n", ret);
+      return -1;
+    }
+
    
     printf("Trying to update time...\r\n");
     if (ntp.setTime("0.pool.ntp.org") == 0)