diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-15 01:54:49 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-15 01:54:49 +0000 |
commit | 7506c552caceee913d936fde61c22ecb6ecc96c7 (patch) | |
tree | e1d082f0902d82e0bed238e434c275440e5de545 /nuttx/examples | |
parent | b2a7bfbb51f5bf8b34ea593f3b5e76aecf9161ea (diff) | |
download | px4-nuttx-7506c552caceee913d936fde61c22ecb6ecc96c7.tar.gz px4-nuttx-7506c552caceee913d936fde61c22ecb6ecc96c7.tar.bz2 px4-nuttx-7506c552caceee913d936fde61c22ecb6ecc96c7.zip |
Basic SLIP functionality -- but there are issues
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3382 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples')
-rw-r--r-- | nuttx/examples/thttpd/main.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/nuttx/examples/thttpd/main.c b/nuttx/examples/thttpd/main.c index b7c040cdb..f9d0ee055 100644 --- a/nuttx/examples/thttpd/main.c +++ b/nuttx/examples/thttpd/main.c @@ -107,7 +107,7 @@ # endif # define SLIP_DEVNO 0 -# define NET_DEVNAME "slip0" +# define NET_DEVNAME "sl0" #else /* Otherwise, use the standard ethernet device name */ @@ -190,6 +190,17 @@ int user_start(int argc, char *argv[]) char *thttpd_argv = "thttpd"; int ret; + /* Configure SLIP */ + +#ifdef CONFIG_NET_SLIP + ret = slip_initialize(SLIP_DEVNO, CONFIG_NET_SLIPTTY); + if (ret < 0) + { + message("ERROR: SLIP initialization failed: %d\n", ret); + exit(1); + } +#endif + /* Many embedded network interfaces must have a software assigned MAC */ #ifdef CONFIG_EXAMPLE_THTTPD_NOMAC @@ -204,17 +215,6 @@ int user_start(int argc, char *argv[]) uip_setmacaddr(NET_DEVNAME, mac); #endif - /* Configure SLIP */ - -#ifdef CONFIG_NET_SLIP - ret = slip_initialize(SLIP_DEVNO, CONFIG_NET_SLIPTTY); - if (ret < 0) - { - message("ERROR: SLIP initialization failed: %d\n", ret); - exit(1); - } -#endif - /* Set up our host address */ message("Setup network addresses\n"); |