OSDN Git Service
(root)
/
mimic
/
MiMicSDK.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update libMiMic
[mimic/MiMicSDK.git]
/
projects
/
example
/
sample.net.simplehttpd
/
src
/
sketch.c
diff --git
a/projects/example/sample.net.simplehttpd/src/sketch.c
b/projects/example/sample.net.simplehttpd/src/sketch.c
index
354ee4a
..
06530d3
100644
(file)
--- a/
projects/example/sample.net.simplehttpd/src/sketch.c
+++ b/
projects/example/sample.net.simplehttpd/src/sketch.c
@@
-7,9
+7,9
@@
\r
#include "NyLPC_http.h"
\r
#include "NyLPC_utils.h"
\r
\r
#include "NyLPC_http.h"
\r
#include "NyLPC_utils.h"
\r
+#include "../netif/mimicip/NyLPC_cMiMicIpNetIf.h"
\r
\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
struct MyHttpd{
\r
NyLPC_TcHttpd_t super;
\r
}httpd;
\r
@@
-38,8
+38,9
@@
void handler(NyLPC_TcHttpdConnection_t* i_connection)
void setup(void)
\r
{
\r
//uipサービス初期化。いろいろ利用可能に。
\r
void setup(void)
\r
{
\r
//uipサービス初期化。いろいろ利用可能に。
\r
- NyLPC_cNet_initialize(&net);
\r
- NyLPC_cHttpd_initialize(&httpd.super,3000);
\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
}
\r
httpd.super.function.onRequest=handler;
\r
\r
}
\r
@@
-50,7
+51,7
@@
void loop(void)
NyLPC_TcNetConfig_t c2;
\r
//192.168.0.39
\r
NyLPC_cNetConfig_initialize(&c2,NyLPC_TBool_TRUE);
\r
NyLPC_TcNetConfig_t c2;
\r
//192.168.0.39
\r
NyLPC_cNetConfig_initialize(&c2,NyLPC_TBool_TRUE);
\r
- NyLPC_cNet_start(&
net,&c2
);
\r
+ NyLPC_cNet_start(&
(c2.super)
);
\r
NyLPC_cHttpd_loop(&httpd.super);
\r
for(;;);
\r
}
\r
NyLPC_cHttpd_loop(&httpd.super);
\r
for(;;);
\r
}
\r