diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-08-17 09:51:26 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-08-17 09:51:26 -0600 |
commit | 45ae398fe34e373700a02e08c0f779e572862525 (patch) | |
tree | a48ee28cc5816be0ba00d12d5f26b4367dc37dde /apps/nshlib/nsh.h | |
parent | 83bd793f672c95bc632b1467f7e090ca7a6b4038 (diff) | |
download | px4-nuttx-45ae398fe34e373700a02e08c0f779e572862525.tar.gz px4-nuttx-45ae398fe34e373700a02e08c0f779e572862525.tar.bz2 px4-nuttx-45ae398fe34e373700a02e08c0f779e572862525.zip |
Extend the NSH network initialization logic. There is now an option that will create a network monitor thread that will monitor the state of the link. When the link goes down, the code will attempt to gracefully put the Ethernet driver in a down state; When the link comes back, the code will attempt to bring the network back up.
Diffstat (limited to 'apps/nshlib/nsh.h')
-rw-r--r-- | apps/nshlib/nsh.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/apps/nshlib/nsh.h b/apps/nshlib/nsh.h index bff96dc1c..625d10b35 100644 --- a/apps/nshlib/nsh.h +++ b/apps/nshlib/nsh.h @@ -128,16 +128,29 @@ # define CONFIG_NSH_MACADDR 0x00e0deadbeef #endif +#ifndef CONFIG_NET +# undef CONFIG_NSH_ARCHMAC +#endif + +#if !defined(CONFIG_NSH_NETINIT_THREAD) || !defined(CONFIG_ARCH_PHY_INTERRUPT) || \ + !defined(CONFIG_NET_UDP) || defined(CONFIG_DISABLE_SIGNALS) +# undef CONFIG_NSH_NETINIT_MONITOR +#endif + +#ifndef CONFIG_NSH_NETINIT_RETRYMSEC +# define CONFIG_NSH_NETINIT_RETRYMSEC 2000 +#endif + +#ifndef CONFIG_NSH_NETINIT_SIGNO +# define CONFIG_NSH_NETINIT_SIGNO 18 +#endif + #ifndef CONFIG_NSH_NETINIT_THREAD_STACKSIZE # define CONFIG_NSH_NETINIT_THREAD_STACKSIZE 1568 #endif #ifndef CONFIG_NSH_NETINIT_THREAD_PRIORITY -# define CONFIG_NSH_NETINIT_THREAD_PRIORITY 100 -#endif - -#ifndef CONFIG_NET -# undef CONFIG_NSH_ARCHMAC +# define CONFIG_NSH_NETINIT_THREAD_PRIORITY 100 #endif /* Telnetd requires networking support */ |