OSDN Git Service

update libMiMic
[mimic/MiMicSDK.git] / projects / example / test.bigdata / src / sketch.c
index d008bfa..d4384f0 100644 (file)
@@ -4,12 +4,12 @@
  */\r
 #include "boot/sketch.h"\r
 #include "NyLPC_net.h"\r
-\r
+#include "../netif/mimicip/NyLPC_cMiMicIpNetIf.h"\r
 #include "NyLPC_http.h"\r
 #include "NyLPC_utils.h"\r
 \r
 \r
-NyLPC_TcNet_t net;\r
+const struct NyLPC_TiNetInterface_Interface* netif;\r
 struct MyHttpd{\r
        NyLPC_TcHttpd_t super;\r
 }httpd;\r
@@ -37,7 +37,8 @@ void handler(NyLPC_TcHttpdConnection_t* i_connection)
 void setup(void)\r
 {\r
        //uipサービス初期化。いろいろ利用可能に。\r
-       NyLPC_cNet_initialize(&net);\r
+       netif=NyLPC_cMiMicIpNetIf_getNetInterface();\r
+       NyLPC_cNet_initialize(netif);\r
        NyLPC_cHttpd_initialize(&httpd.super,80);\r
        httpd.super.function.onRequest=handler;\r
 \r
@@ -50,7 +51,7 @@ void loop(void)
        NyLPC_cNetConfig_initialize(&c2,NyLPC_TBool_TRUE);\r
        NyLPC_cNetConfig_setIpAddr(&c2,192,168,128,39);\r
        NyLPC_cNetConfig_setGateway(&c2,192,168,128,254);\r
-       NyLPC_cNet_start(&net,&c2);\r
+       NyLPC_cNet_start(&c2.super);\r
        NyLPC_cHttpd_loop(&httpd.super);\r
        for(;;);\r
 }\r