summaryrefslogtreecommitdiff
path: root/nuttx/examples/uip/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/examples/uip/main.c')
-rw-r--r--nuttx/examples/uip/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/nuttx/examples/uip/main.c b/nuttx/examples/uip/main.c
index ded7bca20..eaac73a99 100644
--- a/nuttx/examples/uip/main.c
+++ b/nuttx/examples/uip/main.c
@@ -49,6 +49,7 @@
#include <string.h>
#include <unistd.h>
#include <time.h>
+#include <debug.h>
#include <net/uip/uip.h>
#include <net/uip/uip-arp.h>
@@ -140,17 +141,17 @@ int user_start(int argc, char *argv[])
#if !defined(CONFIG_EXAMPLE_UIP_DHCPC)
/* Set up our host address */
- uip_ipaddr(addr.s_addr, 192, 168, 0, 128 );
+ addr.s_addr = HTONL(CONFIG_EXAMPLE_UIP_IPADDR);
uip_sethostaddr("eth0", &addr);
/* Set up the default router address */
- uip_ipaddr(addr.s_addr, 192, 168, 0, 1);
+ addr.s_addr = HTONL(CONFIG_EXAMPLE_UIP_DRIPADDR);
uip_setdraddr("eth0", &addr);
/* Setup the subnet mask */
- uip_ipaddr(addr.s_addr, 255, 255, 255, 0);
+ addr.s_addr = HTONL(CONFIG_EXAMPLE_UIP_NETMASK);
uip_setnetmask("eth0", &addr);
#endif