From 7506c552caceee913d936fde61c22ecb6ecc96c7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 15 Mar 2011 01:54:49 +0000 Subject: 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 --- nuttx/examples/thttpd/main.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'nuttx/examples') 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"); -- cgit v1.2.3