diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-12-04 23:24:26 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-12-04 23:24:26 +0000 |
commit | 7bf122e61f12e81db8915f40806b69645640ea3f (patch) | |
tree | 3cde7a61f54cb47454a74099944a2dec017039c8 /nuttx/examples/nettest | |
parent | 0f15abc5e2086edf0662fb84e2ad0ca6dac72a3a (diff) | |
download | px4-nuttx-7bf122e61f12e81db8915f40806b69645640ea3f.tar.gz px4-nuttx-7bf122e61f12e81db8915f40806b69645640ea3f.tar.bz2 px4-nuttx-7bf122e61f12e81db8915f40806b69645640ea3f.zip |
Add C5471 ethernet driver debug instrumentation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@425 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/nettest')
-rw-r--r-- | nuttx/examples/nettest/nettest.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nuttx/examples/nettest/nettest.c b/nuttx/examples/nettest/nettest.c index 1a6a59047..8bfe73ca6 100644 --- a/nuttx/examples/nettest/nettest.c +++ b/nuttx/examples/nettest/nettest.c @@ -41,6 +41,7 @@ #include <stdio.h> #include <debug.h> +#include <net/if.h> #include <net/uip/uip.h> #include <net/uip/uip-lib.h> @@ -78,6 +79,21 @@ void user_initialize(void) int user_start(int argc, char *argv[]) { struct in_addr addr; +#if defined(CONFIG_EXAMPLE_NETTEST_NOMAC) + uint8 mac[IFHWADDRLEN]; +#endif + +/* Many embedded network interfaces must have a software assigned MAC */ + +#ifdef CONFIG_EXAMPLE_NETTEST_NOMAC + mac[0] = 0x00; + mac[1] = 0xe0; + mac[2] = 0xb0; + mac[3] = 0x0b; + mac[4] = 0xba; + mac[5] = 0xbe; + uip_setmacaddr("eth0", mac); +#endif /* Set up our host address */ |