mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
Change all occurrences of CONFIG_EXAMPLE_ to CONFIG_EXAMPLES_ for consistency; fleshed out a few more Kconfig files
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5211 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -358,3 +358,7 @@
|
|||||||
context is established first. If the namedapp context is established
|
context is established first. If the namedapp context is established
|
||||||
later, it will overwrite any existing namedapp_list.h and nameapp_proto.h
|
later, it will overwrite any existing namedapp_list.h and nameapp_proto.h
|
||||||
files.
|
files.
|
||||||
|
* CONFIG_EXAMPLES_*: To make things consistent, changed all occurrences
|
||||||
|
of CONFIG_EXAMPLE_* to CONFIG_EXAMPLES_*.
|
||||||
|
* Kconfig: Fleshed out apps/examples/adc/Kconfig and apps/examples/wget/Kconfig.
|
||||||
|
There are still a LOT of empty, stub Kconfig files.
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ ifeq ($(CONFIG_EXAMPLES_DHCPD),y)
|
|||||||
CONFIGURED_APPS += examples/dhcpd
|
CONFIGURED_APPS += examples/dhcpd
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_EXAMPLE_DISCOVER),y)
|
ifeq ($(CONFIG_EXAMPLES_DISCOVER),y)
|
||||||
CONFIGURED_APPS += examples/discover
|
CONFIGURED_APPS += examples/discover
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
+55
-55
@@ -61,19 +61,19 @@ examples/buttons
|
|||||||
specific button interfaces. Configuration options:
|
specific button interfaces. Configuration options:
|
||||||
|
|
||||||
CONFIG_ARCH_BUTTONS - Must be defined for button support
|
CONFIG_ARCH_BUTTONS - Must be defined for button support
|
||||||
CONFIG_EXAMPLE_BUTTONS_MIN - Lowest button number (MIN=0)
|
CONFIG_EXAMPLES_BUTTONS_MIN - Lowest button number (MIN=0)
|
||||||
CONFIG_EXAMPLE_BUTTONS_MAX - Highest button number (MAX=7)
|
CONFIG_EXAMPLES_BUTTONS_MAX - Highest button number (MAX=7)
|
||||||
|
|
||||||
CONFIG_ARCH_IRQBUTTONS - Must be defined for interrupting button support
|
CONFIG_ARCH_IRQBUTTONS - Must be defined for interrupting button support
|
||||||
CONFIG_EXAMPLE_IRQBUTTONS_MIN - Lowest interrupting button number (MIN=0)
|
CONFIG_EXAMPLES_IRQBUTTONS_MIN - Lowest interrupting button number (MIN=0)
|
||||||
CONFIG_EXAMPLE_IRQBUTTONS_MAX - Highest interrupting button number (MAX=7)
|
CONFIG_EXAMPLES_IRQBUTTONS_MAX - Highest interrupting button number (MAX=7)
|
||||||
|
|
||||||
Name strings for buttons:
|
Name strings for buttons:
|
||||||
|
|
||||||
CONFIG_EXAMPLE_BUTTONS_NAME0, CONFIG_EXAMPLE_BUTTONS_NAME1,
|
CONFIG_EXAMPLES_BUTTONS_NAME0, CONFIG_EXAMPLES_BUTTONS_NAME1,
|
||||||
CONFIG_EXAMPLE_BUTTONS_NAME2, CONFIG_EXAMPLE_BUTTONS_NAME3,
|
CONFIG_EXAMPLES_BUTTONS_NAME2, CONFIG_EXAMPLES_BUTTONS_NAME3,
|
||||||
CONFIG_EXAMPLE_BUTTONS_NAME4, CONFIG_EXAMPLE_BUTTONS_NAME5,
|
CONFIG_EXAMPLES_BUTTONS_NAME4, CONFIG_EXAMPLES_BUTTONS_NAME5,
|
||||||
CONFIG_EXAMPLE_BUTTONS_NAME6, CONFIG_EXAMPLE_BUTTONS_NAME7,
|
CONFIG_EXAMPLES_BUTTONS_NAME6, CONFIG_EXAMPLES_BUTTONS_NAME7,
|
||||||
|
|
||||||
Additional architecture-/board- specific configuration settings may also
|
Additional architecture-/board- specific configuration settings may also
|
||||||
be required.
|
be required.
|
||||||
@@ -260,10 +260,10 @@ examples/dhcpd
|
|||||||
configuration settings)
|
configuration settings)
|
||||||
CONFIG_NET_BROADCAST=y - UDP broadcast support is needed.
|
CONFIG_NET_BROADCAST=y - UDP broadcast support is needed.
|
||||||
|
|
||||||
CONFIG_EXAMPLE_DHCPD_NOMAC - (May be defined to use software assigned MAC)
|
CONFIG_EXAMPLES_DHCPD_NOMAC - (May be defined to use software assigned MAC)
|
||||||
CONFIG_EXAMPLE_DHCPD_IPADDR - Target IP address
|
CONFIG_EXAMPLES_DHCPD_IPADDR - Target IP address
|
||||||
CONFIG_EXAMPLE_DHCPD_DRIPADDR - Default router IP addess
|
CONFIG_EXAMPLES_DHCPD_DRIPADDR - Default router IP addess
|
||||||
CONFIG_EXAMPLE_DHCPD_NETMASK - Network mask
|
CONFIG_EXAMPLES_DHCPD_NETMASK - Network mask
|
||||||
|
|
||||||
See also CONFIG_NETUTILS_DHCPD_* settings described elsewhere
|
See also CONFIG_NETUTILS_DHCPD_* settings described elsewhere
|
||||||
and used in netutils/dhcpd/dhcpd.c. These settings are required
|
and used in netutils/dhcpd/dhcpd.c. These settings are required
|
||||||
@@ -291,11 +291,11 @@ examples/discover
|
|||||||
|
|
||||||
NuttX configuration settings:
|
NuttX configuration settings:
|
||||||
|
|
||||||
CONFIG_EXAMPLE_DISCOVER_DHCPC - DHCP Client
|
CONFIG_EXAMPLES_DISCOVER_DHCPC - DHCP Client
|
||||||
CONFIG_EXAMPLE_DISCOVER_NOMAC - Use canned MAC address
|
CONFIG_EXAMPLES_DISCOVER_NOMAC - Use canned MAC address
|
||||||
CONFIG_EXAMPLE_DISCOVER_IPADDR - Target IP address
|
CONFIG_EXAMPLES_DISCOVER_IPADDR - Target IP address
|
||||||
CONFIG_EXAMPLE_DISCOVER_DRIPADDR - Router IP address
|
CONFIG_EXAMPLES_DISCOVER_DRIPADDR - Router IP address
|
||||||
CONFIG_EXAMPLE_DISCOVER_NETMASK - Network Mask
|
CONFIG_EXAMPLES_DISCOVER_NETMASK - Network Mask
|
||||||
|
|
||||||
examples/ftpc
|
examples/ftpc
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
@@ -367,12 +367,12 @@ examples/ftpd
|
|||||||
If CONFIG_EXAMPLES_FTPD_NONETINIT is not defined, then the following may
|
If CONFIG_EXAMPLES_FTPD_NONETINIT is not defined, then the following may
|
||||||
be specified to customized the network configuration:
|
be specified to customized the network configuration:
|
||||||
|
|
||||||
CONFIG_EXAMPLE_FTPD_NOMAC - If the hardware has no MAC address of its
|
CONFIG_EXAMPLES_FTPD_NOMAC - If the hardware has no MAC address of its
|
||||||
own, define this =y to provide a bogus address for testing.
|
own, define this =y to provide a bogus address for testing.
|
||||||
CONFIG_EXAMPLE_FTPD_IPADDR - The target IP address. Default 10.0.0.2
|
CONFIG_EXAMPLES_FTPD_IPADDR - The target IP address. Default 10.0.0.2
|
||||||
CONFIG_EXAMPLE_FTPD_DRIPADDR - The default router address. Default
|
CONFIG_EXAMPLES_FTPD_DRIPADDR - The default router address. Default
|
||||||
10.0.0.1
|
10.0.0.1
|
||||||
CONFIG_EXAMPLE_FTPD_NETMASK - The network mask. Default: 255.255.255.0
|
CONFIG_EXAMPLES_FTPD_NETMASK - The network mask. Default: 255.255.255.0
|
||||||
|
|
||||||
Other required configuration settings: Of course TCP networking support
|
Other required configuration settings: Of course TCP networking support
|
||||||
is required. But here are a couple that are less obvious:
|
is required. But here are a couple that are less obvious:
|
||||||
@@ -465,15 +465,15 @@ examples/igmp
|
|||||||
does not do much of value -- Much more is needed in order to verify
|
does not do much of value -- Much more is needed in order to verify
|
||||||
the IGMP features!
|
the IGMP features!
|
||||||
|
|
||||||
* CONFIG_EXAMPLE_IGMP_NOMAC
|
* CONFIG_EXAMPLES_IGMP_NOMAC
|
||||||
Set if the hardware has no MAC address; one will be assigned
|
Set if the hardware has no MAC address; one will be assigned
|
||||||
* CONFIG_EXAMPLE_IGMP_IPADDR
|
* CONFIG_EXAMPLES_IGMP_IPADDR
|
||||||
Target board IP address
|
Target board IP address
|
||||||
* CONFIG_EXAMPLE_IGMP_DRIPADDR
|
* CONFIG_EXAMPLES_IGMP_DRIPADDR
|
||||||
Default router address
|
Default router address
|
||||||
* CONFIG_EXAMPLE_IGMP_NETMASK
|
* CONFIG_EXAMPLES_IGMP_NETMASK
|
||||||
Network mask
|
Network mask
|
||||||
* CONFIG_EXAMPLE_IGMP_GRPADDR
|
* CONFIG_EXAMPLES_IGMP_GRPADDR
|
||||||
Multicast group address
|
Multicast group address
|
||||||
|
|
||||||
Applications using this example will need to provide an appconfig
|
Applications using this example will need to provide an appconfig
|
||||||
@@ -1023,10 +1023,10 @@ examples/poll
|
|||||||
CONFIG_NSOCKET_DESCRIPTORS - Defined to be greater than 0
|
CONFIG_NSOCKET_DESCRIPTORS - Defined to be greater than 0
|
||||||
CONFIG_NET_NTCP_READAHEAD_BUFFERS - Defined to be greater than zero
|
CONFIG_NET_NTCP_READAHEAD_BUFFERS - Defined to be greater than zero
|
||||||
|
|
||||||
CONFIG_EXAMPLE_POLL_NOMAC - (May be defined to use software assigned MAC)
|
CONFIG_EXAMPLES_POLL_NOMAC - (May be defined to use software assigned MAC)
|
||||||
CONFIG_EXAMPLE_POLL_IPADDR - Target IP address
|
CONFIG_EXAMPLES_POLL_IPADDR - Target IP address
|
||||||
CONFIG_EXAMPLE_POLL_DRIPADDR - Default router IP addess
|
CONFIG_EXAMPLES_POLL_DRIPADDR - Default router IP addess
|
||||||
CONFIG_EXAMPLE_POLL_NETMASK - Network mask
|
CONFIG_EXAMPLES_POLL_NETMASK - Network mask
|
||||||
|
|
||||||
In order to for select to work with incoming connections, you
|
In order to for select to work with incoming connections, you
|
||||||
must also select:
|
must also select:
|
||||||
@@ -1163,14 +1163,14 @@ examples/sendmail
|
|||||||
|
|
||||||
Settings unique to this example include:
|
Settings unique to this example include:
|
||||||
|
|
||||||
CONFIG_EXAMPLE_SENDMAIL_NOMAC - May be defined to use software assigned MAC (optional)
|
CONFIG_EXAMPLES_SENDMAIL_NOMAC - May be defined to use software assigned MAC (optional)
|
||||||
CONFIG_EXAMPLE_SENDMAIL_IPADDR - Target IP address (required)
|
CONFIG_EXAMPLES_SENDMAIL_IPADDR - Target IP address (required)
|
||||||
CONFIG_EXAMPLE_SENDMAIL_DRIPADDR - Default router IP addess (required)
|
CONFIG_EXAMPLES_SENDMAIL_DRIPADDR - Default router IP addess (required)
|
||||||
CONFIG_EXAMPLE_SENDMAILT_NETMASK - Network mask (required)
|
CONFIG_EXAMPLES_SENDMAILT_NETMASK - Network mask (required)
|
||||||
CONFIG_EXAMPLE_SENDMAIL_RECIPIENT - The recipient of the email (required)
|
CONFIG_EXAMPLES_SENDMAIL_RECIPIENT - The recipient of the email (required)
|
||||||
CONFIG_EXAMPLE_SENDMAIL_SENDER - Optional. Default: "nuttx-testing@example.com"
|
CONFIG_EXAMPLES_SENDMAIL_SENDER - Optional. Default: "nuttx-testing@example.com"
|
||||||
CONFIG_EXAMPLE_SENDMAIL_SUBJECT - Optional. Default: "Testing SMTP from NuttX"
|
CONFIG_EXAMPLES_SENDMAIL_SUBJECT - Optional. Default: "Testing SMTP from NuttX"
|
||||||
CONFIG_EXAMPLE_SENDMAIL_BODY - Optional. Default: "Test message sent by NuttX"
|
CONFIG_EXAMPLES_SENDMAIL_BODY - Optional. Default: "Test message sent by NuttX"
|
||||||
|
|
||||||
NOTE: This test has not been verified on the NuttX target environment.
|
NOTE: This test has not been verified on the NuttX target environment.
|
||||||
As of this writing, unit-tested in the Cygwin/Linux host environment.
|
As of this writing, unit-tested in the Cygwin/Linux host environment.
|
||||||
@@ -1213,12 +1213,12 @@ examples/telnetd
|
|||||||
Default: SCHED_PRIORITY_DEFAULT
|
Default: SCHED_PRIORITY_DEFAULT
|
||||||
CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE - Stack size allocated for the
|
CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE - Stack size allocated for the
|
||||||
Telnet client. Default: 2048
|
Telnet client. Default: 2048
|
||||||
CONFIG_EXAMPLE_TELNETD_NOMAC - If the hardware has no MAC address of its
|
CONFIG_EXAMPLES_TELNETD_NOMAC - If the hardware has no MAC address of its
|
||||||
own, define this =y to provide a bogus address for testing.
|
own, define this =y to provide a bogus address for testing.
|
||||||
CONFIG_EXAMPLE_TELNETD_IPADDR - The target IP address. Default 10.0.0.2
|
CONFIG_EXAMPLES_TELNETD_IPADDR - The target IP address. Default 10.0.0.2
|
||||||
CONFIG_EXAMPLE_TELNETD_DRIPADDR - The default router address. Default
|
CONFIG_EXAMPLES_TELNETD_DRIPADDR - The default router address. Default
|
||||||
10.0.0.1
|
10.0.0.1
|
||||||
CONFIG_EXAMPLE_TELNETD_NETMASK - The network mask. Default: 255.255.255.0
|
CONFIG_EXAMPLES_TELNETD_NETMASK - The network mask. Default: 255.255.255.0
|
||||||
|
|
||||||
The appconfig file (apps/.config) should include:
|
The appconfig file (apps/.config) should include:
|
||||||
|
|
||||||
@@ -1240,9 +1240,9 @@ examples/thttpd
|
|||||||
CGI programs. see configs/README.txt for most THTTPD settings.
|
CGI programs. see configs/README.txt for most THTTPD settings.
|
||||||
In addition to those, this example accepts:
|
In addition to those, this example accepts:
|
||||||
|
|
||||||
CONFIG_EXAMPLE_THTTPD_NOMAC - (May be defined to use software assigned MAC)
|
CONFIG_EXAMPLES_THTTPD_NOMAC - (May be defined to use software assigned MAC)
|
||||||
CONFIG_EXAMPLE_THTTPD_DRIPADDR - Default router IP addess
|
CONFIG_EXAMPLES_THTTPD_DRIPADDR - Default router IP addess
|
||||||
CONFIG_EXAMPLE_THTTPD_NETMASK - Network mask
|
CONFIG_EXAMPLES_THTTPD_NETMASK - Network mask
|
||||||
|
|
||||||
Applications using this example will need to provide an appconfig
|
Applications using this example will need to provide an appconfig
|
||||||
file in the configuration directory with instruction to build applications
|
file in the configuration directory with instruction to build applications
|
||||||
@@ -1335,11 +1335,11 @@ examples/uip
|
|||||||
This is a port of uIP tiny webserver example application. Settings
|
This is a port of uIP tiny webserver example application. Settings
|
||||||
specific to this example include:
|
specific to this example include:
|
||||||
|
|
||||||
CONFIG_EXAMPLE_UIP_NOMAC - (May be defined to use software assigned MAC)
|
CONFIG_EXAMPLES_UIP_NOMAC - (May be defined to use software assigned MAC)
|
||||||
CONFIG_EXAMPLE_UIP_IPADDR - Target IP address
|
CONFIG_EXAMPLES_UIP_IPADDR - Target IP address
|
||||||
CONFIG_EXAMPLE_UIP_DRIPADDR - Default router IP addess
|
CONFIG_EXAMPLES_UIP_DRIPADDR - Default router IP addess
|
||||||
CONFIG_EXAMPLE_UIP_NETMASK - Network mask
|
CONFIG_EXAMPLES_UIP_NETMASK - Network mask
|
||||||
CONFIG_EXAMPLE_UIP_DHCPC - Select to get IP address via DHCP
|
CONFIG_EXAMPLES_UIP_DHCPC - Select to get IP address via DHCP
|
||||||
|
|
||||||
If you use DHCPC, then some special configuration network options are
|
If you use DHCPC, then some special configuration network options are
|
||||||
required. These include:
|
required. These include:
|
||||||
@@ -1637,11 +1637,11 @@ examples/wget
|
|||||||
A simple web client example. It will obtain a file from a server using the HTTP
|
A simple web client example. It will obtain a file from a server using the HTTP
|
||||||
protocol. Settings unique to this example include:
|
protocol. Settings unique to this example include:
|
||||||
|
|
||||||
CONFIG_EXAMPLE_WGET_URL - The URL of the file to get
|
CONFIG_EXAMPLES_WGET_URL - The URL of the file to get
|
||||||
CONFIG_EXAMPLE_WGET_NOMAC - (May be defined to use software assigned MAC)
|
CONFIG_EXAMPLES_WGET_NOMAC - (May be defined to use software assigned MAC)
|
||||||
CONFIG_EXAMPLE_WGET_IPADDR - Target IP address
|
CONFIG_EXAMPLES_WGET_IPADDR - Target IP address
|
||||||
CONFIG_EXAMPLE_WGET_DRIPADDR - Default router IP addess
|
CONFIG_EXAMPLES_WGET_DRIPADDR - Default router IP addess
|
||||||
CONFIG_EXAMPLE_WGET_NETMASK - Network mask
|
CONFIG_EXAMPLES_WGET_NETMASK - Network mask
|
||||||
|
|
||||||
This example uses netutils/webclient. Additional configuration settings apply
|
This example uses netutils/webclient. Additional configuration settings apply
|
||||||
to that code as follows (but built-in defaults are probably OK):
|
to that code as follows (but built-in defaults are probably OK):
|
||||||
|
|||||||
@@ -6,8 +6,32 @@
|
|||||||
config EXAMPLES_ADC
|
config EXAMPLES_ADC
|
||||||
bool "ADC example"
|
bool "ADC example"
|
||||||
default n
|
default n
|
||||||
|
depends on ADC
|
||||||
---help---
|
---help---
|
||||||
Enable the ADC example
|
Enable the ADC example
|
||||||
|
|
||||||
if EXAMPLES_ADC
|
if EXAMPLES_ADC
|
||||||
|
|
||||||
|
config EXAMPLES_ADC_DEVPATH
|
||||||
|
string "ADC device path"
|
||||||
|
default "/dev/adc0"
|
||||||
|
---help---
|
||||||
|
The default path to the ADC device. Default: /dev/adc0
|
||||||
|
|
||||||
|
config EXAMPLES_ADC_NSAMPLES
|
||||||
|
int "Number of Sample Groups"
|
||||||
|
default 0
|
||||||
|
depends on !NSH_BUILTIN_APPS
|
||||||
|
---help---
|
||||||
|
If NSH_BUILTIN_APPS is defined, then the number of samples is provided
|
||||||
|
on the command line and this value is ignored. Otherwise, this number
|
||||||
|
of samples is collected and the program terminates. Default: 0 (samples
|
||||||
|
are collected indefinitely).
|
||||||
|
|
||||||
|
config EXAMPLES_ADC_GROUPSIZE
|
||||||
|
int "Number of Samples per Group"
|
||||||
|
default 4
|
||||||
|
---help---
|
||||||
|
The number of samples to read at once. Default: 4
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -57,6 +57,14 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* Use CONFIG_EXAMPLES_ADC_NSAMPLES == 0 to mean to collect samples
|
||||||
|
* indefinitely.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_EXAMPLES_ADC_NSAMPLES
|
||||||
|
# define CONFIG_EXAMPLES_ADC_NSAMPLES 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -249,7 +257,7 @@ int adc_main(int argc, char *argv[])
|
|||||||
|
|
||||||
adc_devpath(&g_adcstate, CONFIG_EXAMPLES_ADC_DEVPATH);
|
adc_devpath(&g_adcstate, CONFIG_EXAMPLES_ADC_DEVPATH);
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLES_ADC_NSAMPLES
|
#if CONFIG_EXAMPLES_ADC_NSAMPLES > 0
|
||||||
g_adcstate.count = CONFIG_EXAMPLES_ADC_NSAMPLES;
|
g_adcstate.count = CONFIG_EXAMPLES_ADC_NSAMPLES;
|
||||||
#else
|
#else
|
||||||
g_adcstate.count = 1;
|
g_adcstate.count = 1;
|
||||||
@@ -267,7 +275,7 @@ int adc_main(int argc, char *argv[])
|
|||||||
* samples that we collect before returning. Otherwise, we never return
|
* samples that we collect before returning. Otherwise, we never return
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_NSH_BUILTIN_APPS) || defined(CONFIG_EXAMPLES_ADC_NSAMPLES)
|
#if defined(CONFIG_NSH_BUILTIN_APPS) || CONFIG_EXAMPLES_ADC_NSAMPLES > 0
|
||||||
message("adc_main: g_adcstate.count: %d\n", g_adcstate.count);
|
message("adc_main: g_adcstate.count: %d\n", g_adcstate.count);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -290,7 +298,7 @@ int adc_main(int argc, char *argv[])
|
|||||||
|
|
||||||
#if defined(CONFIG_NSH_BUILTIN_APPS)
|
#if defined(CONFIG_NSH_BUILTIN_APPS)
|
||||||
for (; g_adcstate.count > 0; g_adcstate.count--)
|
for (; g_adcstate.count > 0; g_adcstate.count--)
|
||||||
#elif defined(CONFIG_EXAMPLES_ADC_NSAMPLES)
|
#elif CONFIG_EXAMPLES_ADC_NSAMPLES > 0
|
||||||
for (g_adcstate.count = 0; g_adcstate.count < CONFIG_EXAMPLES_ADC_NSAMPLES; g_adcstate.count++)
|
for (g_adcstate.count = 0; g_adcstate.count < CONFIG_EXAMPLES_ADC_NSAMPLES; g_adcstate.count++)
|
||||||
#else
|
#else
|
||||||
for (;;)
|
for (;;)
|
||||||
|
|||||||
@@ -61,60 +61,60 @@
|
|||||||
# error "CONFIG_ARCH_BUTTONS is not defined in the configuration"
|
# error "CONFIG_ARCH_BUTTONS is not defined in the configuration"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME0
|
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME0
|
||||||
# define CONFIG_EXAMPLE_BUTTONS_NAME0 "BUTTON0"
|
# define CONFIG_EXAMPLES_BUTTONS_NAME0 "BUTTON0"
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME1
|
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME1
|
||||||
# define CONFIG_EXAMPLE_BUTTONS_NAME1 "BUTTON1"
|
# define CONFIG_EXAMPLES_BUTTONS_NAME1 "BUTTON1"
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME2
|
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME2
|
||||||
# define CONFIG_EXAMPLE_BUTTONS_NAME2 "BUTTON2"
|
# define CONFIG_EXAMPLES_BUTTONS_NAME2 "BUTTON2"
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME3
|
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME3
|
||||||
# define CONFIG_EXAMPLE_BUTTONS_NAME3 "BUTTON3"
|
# define CONFIG_EXAMPLES_BUTTONS_NAME3 "BUTTON3"
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME4
|
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME4
|
||||||
# define CONFIG_EXAMPLE_BUTTONS_NAME4 "BUTTON4"
|
# define CONFIG_EXAMPLES_BUTTONS_NAME4 "BUTTON4"
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME5
|
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME5
|
||||||
# define CONFIG_EXAMPLE_BUTTONS_NAME5 "BUTTON5"
|
# define CONFIG_EXAMPLES_BUTTONS_NAME5 "BUTTON5"
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME6
|
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME6
|
||||||
# define CONFIG_EXAMPLE_BUTTONS_NAME6 "BUTTON6"
|
# define CONFIG_EXAMPLES_BUTTONS_NAME6 "BUTTON6"
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME7
|
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME7
|
||||||
# define CONFIG_EXAMPLE_BUTTONS_NAME7 "BUTTON7"
|
# define CONFIG_EXAMPLES_BUTTONS_NAME7 "BUTTON7"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BUTTON_MIN 0
|
#define BUTTON_MIN 0
|
||||||
#define BUTTON_MAX 7
|
#define BUTTON_MAX 7
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_BUTTONS_MIN
|
#ifndef CONFIG_EXAMPLES_BUTTONS_MIN
|
||||||
# define CONFIG_EXAMPLE_BUTTONS_MIN BUTTON_MIN
|
# define CONFIG_EXAMPLES_BUTTONS_MIN BUTTON_MIN
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_EXAMPLE_BUTTONS_MAX
|
#ifndef CONFIG_EXAMPLES_BUTTONS_MAX
|
||||||
# define CONFIG_EXAMPLE_BUTTONS_MAX BUTTON_MAX
|
# define CONFIG_EXAMPLES_BUTTONS_MAX BUTTON_MAX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_EXAMPLE_BUTTONS_MIN > CONFIG_EXAMPLE_BUTTONS_MAX
|
#if CONFIG_EXAMPLES_BUTTONS_MIN > CONFIG_EXAMPLES_BUTTONS_MAX
|
||||||
# error "CONFIG_EXAMPLE_BUTTONS_MIN > CONFIG_EXAMPLE_BUTTONS_MAX"
|
# error "CONFIG_EXAMPLES_BUTTONS_MIN > CONFIG_EXAMPLES_BUTTONS_MAX"
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_EXAMPLE_BUTTONS_MAX > 7
|
#if CONFIG_EXAMPLES_BUTTONS_MAX > 7
|
||||||
# error "CONFIG_EXAMPLE_BUTTONS_MAX > 7"
|
# error "CONFIG_EXAMPLES_BUTTONS_MAX > 7"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_IRQBUTTONS_MIN
|
#ifndef CONFIG_EXAMPLES_IRQBUTTONS_MIN
|
||||||
# define CONFIG_EXAMPLE_IRQBUTTONS_MIN CONFIG_EXAMPLE_BUTTONS_MIN
|
# define CONFIG_EXAMPLES_IRQBUTTONS_MIN CONFIG_EXAMPLES_BUTTONS_MIN
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_EXAMPLE_IRQBUTTONS_MAX
|
#ifndef CONFIG_EXAMPLES_IRQBUTTONS_MAX
|
||||||
# define CONFIG_EXAMPLE_IRQBUTTONS_MAX CONFIG_EXAMPLE_BUTTONS_MAX
|
# define CONFIG_EXAMPLES_IRQBUTTONS_MAX CONFIG_EXAMPLES_BUTTONS_MAX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_EXAMPLE_IRQBUTTONS_MIN > CONFIG_EXAMPLE_IRQBUTTONS_MAX
|
#if CONFIG_EXAMPLES_IRQBUTTONS_MIN > CONFIG_EXAMPLES_IRQBUTTONS_MAX
|
||||||
# error "CONFIG_EXAMPLE_IRQBUTTONS_MIN > CONFIG_EXAMPLE_IRQBUTTONS_MAX"
|
# error "CONFIG_EXAMPLES_IRQBUTTONS_MIN > CONFIG_EXAMPLES_IRQBUTTONS_MAX"
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_EXAMPLE_IRQBUTTONS_MAX > 7
|
#if CONFIG_EXAMPLES_IRQBUTTONS_MAX > 7
|
||||||
# error "CONFIG_EXAMPLE_IRQBUTTONS_MAX > 7"
|
# error "CONFIG_EXAMPLES_IRQBUTTONS_MAX > 7"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
@@ -124,8 +124,8 @@
|
|||||||
# define MAX(a,b) (a > b ? a : b)
|
# define MAX(a,b) (a > b ? a : b)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MIN_BUTTON MIN(CONFIG_EXAMPLE_BUTTONS_MIN, CONFIG_EXAMPLE_IRQBUTTONS_MIN)
|
#define MIN_BUTTON MIN(CONFIG_EXAMPLES_BUTTONS_MIN, CONFIG_EXAMPLES_IRQBUTTONS_MIN)
|
||||||
#define MAX_BUTTON MAX(CONFIG_EXAMPLE_BUTTONS_MAX, CONFIG_EXAMPLE_IRQBUTTONS_MAX)
|
#define MAX_BUTTON MAX(CONFIG_EXAMPLES_BUTTONS_MAX, CONFIG_EXAMPLES_IRQBUTTONS_MAX)
|
||||||
|
|
||||||
#define NUM_BUTTONS (MAX_BUTTON - MIN_BUTTON + 1)
|
#define NUM_BUTTONS (MAX_BUTTON - MIN_BUTTON + 1)
|
||||||
#define BUTTON_INDEX(b) ((b)-MIN_BUTTON)
|
#define BUTTON_INDEX(b) ((b)-MIN_BUTTON)
|
||||||
@@ -187,7 +187,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
|||||||
{
|
{
|
||||||
#if MIN_BUTTON < 1
|
#if MIN_BUTTON < 1
|
||||||
{
|
{
|
||||||
CONFIG_EXAMPLE_BUTTONS_NAME0,
|
CONFIG_EXAMPLES_BUTTONS_NAME0,
|
||||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||||
button0_handler
|
button0_handler
|
||||||
#endif
|
#endif
|
||||||
@@ -195,7 +195,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
|||||||
#endif
|
#endif
|
||||||
#if MIN_BUTTON < 2 && MAX_BUTTON > 0
|
#if MIN_BUTTON < 2 && MAX_BUTTON > 0
|
||||||
{
|
{
|
||||||
CONFIG_EXAMPLE_BUTTONS_NAME1,
|
CONFIG_EXAMPLES_BUTTONS_NAME1,
|
||||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||||
button1_handler
|
button1_handler
|
||||||
#endif
|
#endif
|
||||||
@@ -203,7 +203,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
|||||||
#endif
|
#endif
|
||||||
#if MIN_BUTTON < 3 && MAX_BUTTON > 1
|
#if MIN_BUTTON < 3 && MAX_BUTTON > 1
|
||||||
{
|
{
|
||||||
CONFIG_EXAMPLE_BUTTONS_NAME2,
|
CONFIG_EXAMPLES_BUTTONS_NAME2,
|
||||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||||
button2_handler
|
button2_handler
|
||||||
#endif
|
#endif
|
||||||
@@ -211,7 +211,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
|||||||
#endif
|
#endif
|
||||||
#if MIN_BUTTON < 4 && MAX_BUTTON > 2
|
#if MIN_BUTTON < 4 && MAX_BUTTON > 2
|
||||||
{
|
{
|
||||||
CONFIG_EXAMPLE_BUTTONS_NAME3,
|
CONFIG_EXAMPLES_BUTTONS_NAME3,
|
||||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||||
button3_handler
|
button3_handler
|
||||||
#endif
|
#endif
|
||||||
@@ -219,7 +219,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
|||||||
#endif
|
#endif
|
||||||
#if MIN_BUTTON < 5 && MAX_BUTTON > 3
|
#if MIN_BUTTON < 5 && MAX_BUTTON > 3
|
||||||
{
|
{
|
||||||
CONFIG_EXAMPLE_BUTTONS_NAME4,
|
CONFIG_EXAMPLES_BUTTONS_NAME4,
|
||||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||||
button4_handler
|
button4_handler
|
||||||
#endif
|
#endif
|
||||||
@@ -227,7 +227,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
|||||||
#endif
|
#endif
|
||||||
#if MIN_BUTTON < 6 && MAX_BUTTON > 4
|
#if MIN_BUTTON < 6 && MAX_BUTTON > 4
|
||||||
{
|
{
|
||||||
CONFIG_EXAMPLE_BUTTONS_NAME5,
|
CONFIG_EXAMPLES_BUTTONS_NAME5,
|
||||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||||
button5_handler
|
button5_handler
|
||||||
#endif
|
#endif
|
||||||
@@ -235,7 +235,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
|||||||
#endif
|
#endif
|
||||||
#if MIN_BUTTON < 7 && MAX_BUTTON > 5
|
#if MIN_BUTTON < 7 && MAX_BUTTON > 5
|
||||||
{
|
{
|
||||||
CONFIG_EXAMPLE_BUTTONS_NAME6,
|
CONFIG_EXAMPLES_BUTTONS_NAME6,
|
||||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||||
button6_handler
|
button6_handler
|
||||||
#endif
|
#endif
|
||||||
@@ -243,7 +243,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
|||||||
#endif
|
#endif
|
||||||
#if MAX_BUTTON > 6
|
#if MAX_BUTTON > 6
|
||||||
{
|
{
|
||||||
CONFIG_EXAMPLE_BUTTONS_NAME7,
|
CONFIG_EXAMPLES_BUTTONS_NAME7,
|
||||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||||
button7_handler
|
button7_handler
|
||||||
#endif
|
#endif
|
||||||
@@ -419,7 +419,7 @@ int buttons_main(int argc, char *argv[])
|
|||||||
/* Register to recieve button interrupts */
|
/* Register to recieve button interrupts */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||||
for (i = CONFIG_EXAMPLE_IRQBUTTONS_MIN; i <= CONFIG_EXAMPLE_IRQBUTTONS_MAX; i++)
|
for (i = CONFIG_EXAMPLES_IRQBUTTONS_MIN; i <= CONFIG_EXAMPLES_IRQBUTTONS_MAX; i++)
|
||||||
{
|
{
|
||||||
xcpt_t oldhandler = up_irqbutton(i, g_buttoninfo[BUTTON_INDEX(i)].handler);
|
xcpt_t oldhandler = up_irqbutton(i, g_buttoninfo[BUTTON_INDEX(i)].handler);
|
||||||
|
|
||||||
@@ -488,7 +488,7 @@ int buttons_main(int argc, char *argv[])
|
|||||||
/* Un-register button handlers */
|
/* Un-register button handlers */
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_IRQBUTTONS) && defined(CONFIG_NSH_BUILTIN_APPS)
|
#if defined(CONFIG_ARCH_IRQBUTTONS) && defined(CONFIG_NSH_BUILTIN_APPS)
|
||||||
for (i = CONFIG_EXAMPLE_IRQBUTTONS_MIN; i <= CONFIG_EXAMPLE_IRQBUTTONS_MAX; i++)
|
for (i = CONFIG_EXAMPLES_IRQBUTTONS_MIN; i <= CONFIG_EXAMPLES_IRQBUTTONS_MAX; i++)
|
||||||
{
|
{
|
||||||
(void)up_irqbutton(i, NULL);
|
(void)up_irqbutton(i, NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,16 +57,16 @@
|
|||||||
* but there are default values for those so we cannot check them here.
|
* but there are default values for those so we cannot check them here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_DHCPD_IPADDR
|
#ifndef CONFIG_EXAMPLES_DHCPD_IPADDR
|
||||||
# error "You must define CONFIG_EXAMPLE_DHCPD_IPADDR"
|
# error "You must define CONFIG_EXAMPLES_DHCPD_IPADDR"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_DHCPD_DRIPADDR
|
#ifndef CONFIG_EXAMPLES_DHCPD_DRIPADDR
|
||||||
# error "You must define CONFIG_EXAMPLE_DHCPD_DRIPADDR"
|
# error "You must define CONFIG_EXAMPLES_DHCPD_DRIPADDR"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_DHCPD_NETMASK
|
#ifndef CONFIG_EXAMPLES_DHCPD_NETMASK
|
||||||
# error "You must define CONFIG_EXAMPLE_DHCPD_NETMASK"
|
# error "You must define CONFIG_EXAMPLES_DHCPD_NETMASK"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_NET
|
#ifndef CONFIG_NET
|
||||||
@@ -92,13 +92,13 @@
|
|||||||
int dhcpd_main(int argc, char *argv[])
|
int dhcpd_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
#if defined(CONFIG_EXAMPLE_DHCPD_NOMAC)
|
#if defined(CONFIG_EXAMPLES_DHCPD_NOMAC)
|
||||||
uint8_t mac[IFHWADDRLEN];
|
uint8_t mac[IFHWADDRLEN];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Many embedded network interfaces must have a software assigned MAC */
|
/* Many embedded network interfaces must have a software assigned MAC */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_DHCPD_NOMAC
|
#ifdef CONFIG_EXAMPLES_DHCPD_NOMAC
|
||||||
mac[0] = 0x00;
|
mac[0] = 0x00;
|
||||||
mac[1] = 0xe0;
|
mac[1] = 0xe0;
|
||||||
mac[2] = 0xde;
|
mac[2] = 0xde;
|
||||||
@@ -110,17 +110,17 @@ int dhcpd_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Set up our host address */
|
/* Set up our host address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_DHCPD_IPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_DHCPD_IPADDR);
|
||||||
uip_sethostaddr("eth0", &addr);
|
uip_sethostaddr("eth0", &addr);
|
||||||
|
|
||||||
/* Set up the default router address */
|
/* Set up the default router address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_DHCPD_DRIPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_DHCPD_DRIPADDR);
|
||||||
uip_setdraddr("eth0", &addr);
|
uip_setdraddr("eth0", &addr);
|
||||||
|
|
||||||
/* Setup the subnet mask */
|
/* Setup the subnet mask */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_DHCPD_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_DHCPD_NETMASK);
|
||||||
uip_setnetmask("eth0", &addr);
|
uip_setnetmask("eth0", &addr);
|
||||||
|
|
||||||
/* Then start the server */
|
/* Then start the server */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# see misc/tools/kconfig-language.txt.
|
# see misc/tools/kconfig-language.txt.
|
||||||
#
|
#
|
||||||
|
|
||||||
config EXAMPLE_DISCOVER
|
config EXAMPLES_DISCOVER
|
||||||
bool "UDP Discovery Example"
|
bool "UDP Discovery Example"
|
||||||
default n
|
default n
|
||||||
depends on NET_UDP
|
depends on NET_UDP
|
||||||
@@ -17,29 +17,29 @@ config EXAMPLE_DISCOVER
|
|||||||
It is also possible to address all classes with a kind of broadcast
|
It is also possible to address all classes with a kind of broadcast
|
||||||
discover.
|
discover.
|
||||||
|
|
||||||
config EXAMPLE_DISCOVER_DHCPC
|
config EXAMPLES_DISCOVER_DHCPC
|
||||||
bool "DHCP Client"
|
bool "DHCP Client"
|
||||||
default n
|
default n
|
||||||
depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS
|
depends on EXAMPLES_DISCOVER && !NSH_BUILTIN_APPS
|
||||||
select NETUTILS_DHCPC
|
select NETUTILS_DHCPC
|
||||||
select NETUTILS_RESOLV
|
select NETUTILS_RESOLV
|
||||||
|
|
||||||
config EXAMPLE_DISCOVER_NOMAC
|
config EXAMPLES_DISCOVER_NOMAC
|
||||||
bool "Use Canned MAC Address"
|
bool "Use Canned MAC Address"
|
||||||
default n
|
default n
|
||||||
depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS
|
depends on EXAMPLES_DISCOVER && !NSH_BUILTIN_APPS
|
||||||
|
|
||||||
config EXAMPLE_DISCOVER_IPADDR
|
config EXAMPLES_DISCOVER_IPADDR
|
||||||
hex "Target IP address"
|
hex "Target IP address"
|
||||||
default 0x0a000002
|
default 0x0a000002
|
||||||
depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS && !EXAMPLE_DISCOVER_DHCPC
|
depends on EXAMPLES_DISCOVER && !NSH_BUILTIN_APPS && !EXAMPLES_DISCOVER_DHCPC
|
||||||
|
|
||||||
config EXAMPLE_DISCOVER_DRIPADDR
|
config EXAMPLES_DISCOVER_DRIPADDR
|
||||||
hex "Default Router IP address (Gateway)"
|
hex "Default Router IP address (Gateway)"
|
||||||
default 0x0a000001
|
default 0x0a000001
|
||||||
depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS
|
depends on EXAMPLES_DISCOVER && !NSH_BUILTIN_APPS
|
||||||
|
|
||||||
config EXAMPLE_DISCOVER_NETMASK
|
config EXAMPLES_DISCOVER_NETMASK
|
||||||
hex "Network Mask"
|
hex "Network Mask"
|
||||||
default 0xffffff00
|
default 0xffffff00
|
||||||
depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS
|
depends on EXAMPLES_DISCOVER && !NSH_BUILTIN_APPS
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
#include <apps/netutils/uiplib.h>
|
#include <apps/netutils/uiplib.h>
|
||||||
#include <apps/netutils/discover.h>
|
#include <apps/netutils/discover.h>
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_DISCOVER_DHCPC
|
#ifdef CONFIG_EXAMPLES_DISCOVER_DHCPC
|
||||||
# include <arpa/inet.h>
|
# include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
/* DHCPC may be used in conjunction with any other feature (or not) */
|
/* DHCPC may be used in conjunction with any other feature (or not) */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_DISCOVER_DHCPC
|
#ifdef CONFIG_EXAMPLES_DISCOVER_DHCPC
|
||||||
# include <apps/netutils/resolv.h>
|
# include <apps/netutils/resolv.h>
|
||||||
# include <apps/netutils/dhcpc.h>
|
# include <apps/netutils/dhcpc.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -93,16 +93,16 @@ int discover_main(int argc, char *argv[])
|
|||||||
|
|
||||||
#ifndef CONFIG_NSH_BUILTIN_APPS
|
#ifndef CONFIG_NSH_BUILTIN_APPS
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
#if defined(CONFIG_EXAMPLE_DISCOVER_DHCPC) || defined(CONFIG_EXAMPLE_DISCOVER_NOMAC)
|
#if defined(CONFIG_EXAMPLES_DISCOVER_DHCPC) || defined(CONFIG_EXAMPLES_DISCOVER_NOMAC)
|
||||||
uint8_t mac[IFHWADDRLEN];
|
uint8_t mac[IFHWADDRLEN];
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_EXAMPLE_DISCOVER_DHCPC
|
#ifdef CONFIG_EXAMPLES_DISCOVER_DHCPC
|
||||||
void *handle;
|
void *handle;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Many embedded network interfaces must have a software assigned MAC */
|
/* Many embedded network interfaces must have a software assigned MAC */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_DISCOVER_NOMAC
|
#ifdef CONFIG_EXAMPLES_DISCOVER_NOMAC
|
||||||
mac[0] = 0x00;
|
mac[0] = 0x00;
|
||||||
mac[1] = 0xe0;
|
mac[1] = 0xe0;
|
||||||
mac[2] = 0xde;
|
mac[2] = 0xde;
|
||||||
@@ -114,24 +114,24 @@ int discover_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Set up our host address */
|
/* Set up our host address */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_DISCOVER_DHCPC
|
#ifdef CONFIG_EXAMPLES_DISCOVER_DHCPC
|
||||||
addr.s_addr = 0;
|
addr.s_addr = 0;
|
||||||
#else
|
#else
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_DISCOVER_IPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_DISCOVER_IPADDR);
|
||||||
#endif
|
#endif
|
||||||
uip_sethostaddr("eth0", &addr);
|
uip_sethostaddr("eth0", &addr);
|
||||||
|
|
||||||
/* Set up the default router address */
|
/* Set up the default router address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_DISCOVER_DRIPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_DISCOVER_DRIPADDR);
|
||||||
uip_setdraddr("eth0", &addr);
|
uip_setdraddr("eth0", &addr);
|
||||||
|
|
||||||
/* Setup the subnet mask */
|
/* Setup the subnet mask */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_DISCOVER_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_DISCOVER_NETMASK);
|
||||||
uip_setnetmask("eth0", &addr);
|
uip_setnetmask("eth0", &addr);
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_DISCOVER_DHCPC
|
#ifdef CONFIG_EXAMPLES_DISCOVER_DHCPC
|
||||||
/* Set up the resolver */
|
/* Set up the resolver */
|
||||||
|
|
||||||
resolv_init();
|
resolv_init();
|
||||||
@@ -174,7 +174,7 @@ int discover_main(int argc, char *argv[])
|
|||||||
printf("IP: %s\n", inet_ntoa(ds.ipaddr));
|
printf("IP: %s\n", inet_ntoa(ds.ipaddr));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_EXAMPLE_DISCOVER_DHCPC */
|
#endif /* CONFIG_EXAMPLES_DISCOVER_DHCPC */
|
||||||
#endif /* CONFIG_NSH_BUILTIN_APPS */
|
#endif /* CONFIG_NSH_BUILTIN_APPS */
|
||||||
|
|
||||||
if (discover_start() < 0)
|
if (discover_start() < 0)
|
||||||
|
|||||||
+13
-13
@@ -61,12 +61,12 @@
|
|||||||
* If CONFIG_EXAMPLES_FTPD_NONETINIT is not defined, then the following may
|
* If CONFIG_EXAMPLES_FTPD_NONETINIT is not defined, then the following may
|
||||||
* be specified to customized the network configuration:
|
* be specified to customized the network configuration:
|
||||||
*
|
*
|
||||||
* CONFIG_EXAMPLE_FTPD_NOMAC - If the hardware has no MAC address of its
|
* CONFIG_EXAMPLES_FTPD_NOMAC - If the hardware has no MAC address of its
|
||||||
* own, define this =y to provide a bogus address for testing.
|
* own, define this =y to provide a bogus address for testing.
|
||||||
* CONFIG_EXAMPLE_FTPD_IPADDR - The target IP address. Default 10.0.0.2
|
* CONFIG_EXAMPLES_FTPD_IPADDR - The target IP address. Default 10.0.0.2
|
||||||
* CONFIG_EXAMPLE_FTPD_DRIPADDR - The default router address. Default
|
* CONFIG_EXAMPLES_FTPD_DRIPADDR - The default router address. Default
|
||||||
* 10.0.0.1
|
* 10.0.0.1
|
||||||
* CONFIG_EXAMPLE_FTPD_NETMASK - The network mask. Default: 255.255.255.0
|
* CONFIG_EXAMPLES_FTPD_NETMASK - The network mask. Default: 255.255.255.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLES_FTPD_PRIO
|
#ifndef CONFIG_EXAMPLES_FTPD_PRIO
|
||||||
@@ -92,18 +92,18 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLES_FTPD_NONETINIT
|
#ifdef CONFIG_EXAMPLES_FTPD_NONETINIT
|
||||||
# undef CONFIG_EXAMPLE_FTPD_IPADDR
|
# undef CONFIG_EXAMPLES_FTPD_IPADDR
|
||||||
# undef CONFIG_EXAMPLE_FTPD_DRIPADDR
|
# undef CONFIG_EXAMPLES_FTPD_DRIPADDR
|
||||||
# undef CONFIG_EXAMPLE_FTPD_NETMASK
|
# undef CONFIG_EXAMPLES_FTPD_NETMASK
|
||||||
#else
|
#else
|
||||||
# ifndef CONFIG_EXAMPLE_FTPD_IPADDR
|
# ifndef CONFIG_EXAMPLES_FTPD_IPADDR
|
||||||
# define CONFIG_EXAMPLE_FTPD_IPADDR 0x0a000002
|
# define CONFIG_EXAMPLES_FTPD_IPADDR 0x0a000002
|
||||||
# endif
|
# endif
|
||||||
# ifndef CONFIG_EXAMPLE_FTPD_DRIPADDR
|
# ifndef CONFIG_EXAMPLES_FTPD_DRIPADDR
|
||||||
# define CONFIG_EXAMPLE_FTPD_DRIPADDR 0x0a000001
|
# define CONFIG_EXAMPLES_FTPD_DRIPADDR 0x0a000001
|
||||||
# endif
|
# endif
|
||||||
# ifndef CONFIG_EXAMPLE_FTPD_NETMASK
|
# ifndef CONFIG_EXAMPLES_FTPD_NETMASK
|
||||||
# define CONFIG_EXAMPLE_FTPD_NETMASK 0xffffff00
|
# define CONFIG_EXAMPLES_FTPD_NETMASK 0xffffff00
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -83,13 +83,13 @@ static void fptd_netinit(void)
|
|||||||
{
|
{
|
||||||
#ifndef CONFIG_EXAMPLES_FTPD_NONETINIT
|
#ifndef CONFIG_EXAMPLES_FTPD_NONETINIT
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
#ifdef CONFIG_EXAMPLE_FTPD_NOMAC
|
#ifdef CONFIG_EXAMPLES_FTPD_NOMAC
|
||||||
uint8_t mac[IFHWADDRLEN];
|
uint8_t mac[IFHWADDRLEN];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Many embedded network interfaces must have a software assigned MAC */
|
/* Many embedded network interfaces must have a software assigned MAC */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_FTPD_NOMAC
|
#ifdef CONFIG_EXAMPLES_FTPD_NOMAC
|
||||||
mac[0] = 0x00;
|
mac[0] = 0x00;
|
||||||
mac[1] = 0xe0;
|
mac[1] = 0xe0;
|
||||||
mac[2] = 0xde;
|
mac[2] = 0xde;
|
||||||
@@ -101,17 +101,17 @@ static void fptd_netinit(void)
|
|||||||
|
|
||||||
/* Set up our host address */
|
/* Set up our host address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_FTPD_IPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_FTPD_IPADDR);
|
||||||
uip_sethostaddr("eth0", &addr);
|
uip_sethostaddr("eth0", &addr);
|
||||||
|
|
||||||
/* Set up the default router address */
|
/* Set up the default router address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_FTPD_DRIPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_FTPD_DRIPADDR);
|
||||||
uip_setdraddr("eth0", &addr);
|
uip_setdraddr("eth0", &addr);
|
||||||
|
|
||||||
/* Setup the subnet mask */
|
/* Setup the subnet mask */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_FTPD_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_FTPD_NETMASK);
|
||||||
uip_setnetmask("eth0", &addr);
|
uip_setnetmask("eth0", &addr);
|
||||||
#endif /* CONFIG_EXAMPLES_FTPD_NONETINIT */
|
#endif /* CONFIG_EXAMPLES_FTPD_NONETINIT */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,8 +64,8 @@
|
|||||||
* addresses=0xff (ff00::/8.)
|
* addresses=0xff (ff00::/8.)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if ((CONFIG_EXAMPLE_IGMP_GRPADDR & 0xffff0000) < 0xe0000000ul) || \
|
#if ((CONFIG_EXAMPLES_IGMP_GRPADDR & 0xffff0000) < 0xe0000000ul) || \
|
||||||
((CONFIG_EXAMPLE_IGMP_GRPADDR & 0xffff0000) > 0xeffffffful)
|
((CONFIG_EXAMPLES_IGMP_GRPADDR & 0xffff0000) > 0xeffffffful)
|
||||||
# error "Bad range for IGMP group address"
|
# error "Bad range for IGMP group address"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
int igmp_main(int argc, char *argv[])
|
int igmp_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
#if defined(CONFIG_EXAMPLE_IGMP_NOMAC)
|
#if defined(CONFIG_EXAMPLES_IGMP_NOMAC)
|
||||||
uint8_t mac[IFHWADDRLEN];
|
uint8_t mac[IFHWADDRLEN];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ int igmp_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Many embedded network interfaces must have a software assigned MAC */
|
/* Many embedded network interfaces must have a software assigned MAC */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_IGMP_NOMAC
|
#ifdef CONFIG_EXAMPLES_IGMP_NOMAC
|
||||||
mac[0] = 0x00;
|
mac[0] = 0x00;
|
||||||
mac[1] = 0xe0;
|
mac[1] = 0xe0;
|
||||||
mac[2] = 0xde;
|
mac[2] = 0xde;
|
||||||
@@ -104,24 +104,24 @@ int igmp_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Set up our host address */
|
/* Set up our host address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_IGMP_IPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_IGMP_IPADDR);
|
||||||
uip_sethostaddr("eth0", &addr);
|
uip_sethostaddr("eth0", &addr);
|
||||||
|
|
||||||
/* Set up the default router address */
|
/* Set up the default router address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_IGMP_DRIPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_IGMP_DRIPADDR);
|
||||||
uip_setdraddr("eth0", &addr);
|
uip_setdraddr("eth0", &addr);
|
||||||
|
|
||||||
/* Setup the subnet mask */
|
/* Setup the subnet mask */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_IGMP_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_IGMP_NETMASK);
|
||||||
uip_setnetmask("eth0", &addr);
|
uip_setnetmask("eth0", &addr);
|
||||||
|
|
||||||
/* Not much of a test for now */
|
/* Not much of a test for now */
|
||||||
/* Join the group */
|
/* Join the group */
|
||||||
|
|
||||||
message("Join group...\n");
|
message("Join group...\n");
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_IGMP_GRPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_IGMP_GRPADDR);
|
||||||
ipmsfilter("eth0", &addr, MCAST_INCLUDE);
|
ipmsfilter("eth0", &addr, MCAST_INCLUDE);
|
||||||
|
|
||||||
/* Wait a while */
|
/* Wait a while */
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ TARG_ASRCS =
|
|||||||
TARG_AOBJS = $(TARG_ASRCS:.S=$(OBJEXT))
|
TARG_AOBJS = $(TARG_ASRCS:.S=$(OBJEXT))
|
||||||
|
|
||||||
TARG_CSRCS = nettest.c
|
TARG_CSRCS = nettest.c
|
||||||
ifeq ($(CONFIG_EXAMPLE_NETTEST_SERVER),y)
|
ifeq ($(CONFIG_EXAMPLES_NETTEST_SERVER),y)
|
||||||
TARG_CSRCS += nettest_server.c
|
TARG_CSRCS += nettest_server.c
|
||||||
else
|
else
|
||||||
TARG_CSRCS += nettest_client.c
|
TARG_CSRCS += nettest_client.c
|
||||||
@@ -61,19 +61,19 @@ else
|
|||||||
TARG_BIN = "$(TARG_POSIX)"
|
TARG_BIN = "$(TARG_POSIX)"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
HOSTCFLAGS += -DCONFIG_EXAMPLE_NETTEST_HOST=1
|
HOSTCFLAGS += -DCONFIG_EXAMPLES_NETTEST_HOST=1
|
||||||
ifeq ($(CONFIG_EXAMPLE_NETTEST_SERVER),y)
|
ifeq ($(CONFIG_EXAMPLES_NETTEST_SERVER),y)
|
||||||
HOSTCFLAGS += -DCONFIG_EXAMPLE_NETTEST_SERVER=1 \
|
HOSTCFLAGS += -DCONFIG_EXAMPLES_NETTEST_SERVER=1 \
|
||||||
-DCONFIG_EXAMPLE_NETTEST_CLIENTIP="$(CONFIG_EXAMPLE_NETTEST_CLIENTIP)"
|
-DCONFIG_EXAMPLES_NETTEST_CLIENTIP="$(CONFIG_EXAMPLES_NETTEST_CLIENTIP)"
|
||||||
endif
|
endif
|
||||||
ifeq ($(CONFIG_EXAMPLE_NETTEST_PERFORMANCE),y)
|
ifeq ($(CONFIG_EXAMPLES_NETTEST_PERFORMANCE),y)
|
||||||
HOSTCFLAGS += -DCONFIG_EXAMPLE_NETTEST_PERFORMANCE=1
|
HOSTCFLAGS += -DCONFIG_EXAMPLES_NETTEST_PERFORMANCE=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
HOST_SRCS = host.c
|
HOST_SRCS = host.c
|
||||||
ifeq ($(CONFIG_EXAMPLE_NETTEST_SERVER),y)
|
ifeq ($(CONFIG_EXAMPLES_NETTEST_SERVER),y)
|
||||||
HOST_SRCS += nettest_client.c
|
HOST_SRCS += nettest_client.c
|
||||||
else
|
else
|
||||||
HOST_SRCS += nettest_server.c
|
HOST_SRCS += nettest_server.c
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
int main(int argc, char **argv, char **envp)
|
int main(int argc, char **argv, char **envp)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_EXAMPLE_NETTEST_SERVER
|
#ifdef CONFIG_EXAMPLES_NETTEST_SERVER
|
||||||
send_client();
|
send_client();
|
||||||
#else
|
#else
|
||||||
recv_server();
|
recv_server();
|
||||||
|
|||||||
@@ -68,13 +68,13 @@
|
|||||||
int nettest_main(int argc, char *argv[])
|
int nettest_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
#ifdef CONFIG_EXAMPLE_NETTEST_NOMAC
|
#ifdef CONFIG_EXAMPLES_NETTEST_NOMAC
|
||||||
uint8_t mac[IFHWADDRLEN];
|
uint8_t mac[IFHWADDRLEN];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Many embedded network interfaces must have a software assigned MAC */
|
/* Many embedded network interfaces must have a software assigned MAC */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_NETTEST_NOMAC
|
#ifdef CONFIG_EXAMPLES_NETTEST_NOMAC
|
||||||
mac[0] = 0x00;
|
mac[0] = 0x00;
|
||||||
mac[1] = 0xe0;
|
mac[1] = 0xe0;
|
||||||
mac[2] = 0xde;
|
mac[2] = 0xde;
|
||||||
@@ -86,20 +86,20 @@ int nettest_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Set up our host address */
|
/* Set up our host address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_NETTEST_IPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_NETTEST_IPADDR);
|
||||||
uip_sethostaddr("eth0", &addr);
|
uip_sethostaddr("eth0", &addr);
|
||||||
|
|
||||||
/* Set up the default router address */
|
/* Set up the default router address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_NETTEST_DRIPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_NETTEST_DRIPADDR);
|
||||||
uip_setdraddr("eth0", &addr);
|
uip_setdraddr("eth0", &addr);
|
||||||
|
|
||||||
/* Setup the subnet mask */
|
/* Setup the subnet mask */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_NETTEST_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_NETTEST_NETMASK);
|
||||||
uip_setnetmask("eth0", &addr);
|
uip_setnetmask("eth0", &addr);
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_NETTEST_SERVER
|
#ifdef CONFIG_EXAMPLES_NETTEST_SERVER
|
||||||
recv_server();
|
recv_server();
|
||||||
#else
|
#else
|
||||||
send_client();
|
send_client();
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_NETTEST_HOST
|
#ifdef CONFIG_EXAMPLES_NETTEST_HOST
|
||||||
#else
|
#else
|
||||||
# include <debug.h>
|
# include <debug.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
* Definitions
|
* Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_NETTEST_HOST
|
#ifdef CONFIG_EXAMPLES_NETTEST_HOST
|
||||||
/* HTONS/L macros are unique to uIP */
|
/* HTONS/L macros are unique to uIP */
|
||||||
|
|
||||||
# define HTONS(a) htons(a)
|
# define HTONS(a) htons(a)
|
||||||
|
|||||||
@@ -56,12 +56,12 @@ void send_client(void)
|
|||||||
{
|
{
|
||||||
struct sockaddr_in myaddr;
|
struct sockaddr_in myaddr;
|
||||||
char *outbuf;
|
char *outbuf;
|
||||||
#ifndef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
|
#ifndef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
|
||||||
char *inbuf;
|
char *inbuf;
|
||||||
#endif
|
#endif
|
||||||
int sockfd;
|
int sockfd;
|
||||||
int nbytessent;
|
int nbytessent;
|
||||||
#ifndef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
|
#ifndef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
|
||||||
int nbytesrecvd;
|
int nbytesrecvd;
|
||||||
int totalbytesrecvd;
|
int totalbytesrecvd;
|
||||||
#endif
|
#endif
|
||||||
@@ -71,7 +71,7 @@ void send_client(void)
|
|||||||
/* Allocate buffers */
|
/* Allocate buffers */
|
||||||
|
|
||||||
outbuf = (char*)malloc(SENDSIZE);
|
outbuf = (char*)malloc(SENDSIZE);
|
||||||
#ifndef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
|
#ifndef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
|
||||||
inbuf = (char*)malloc(SENDSIZE);
|
inbuf = (char*)malloc(SENDSIZE);
|
||||||
if (!outbuf || !inbuf)
|
if (!outbuf || !inbuf)
|
||||||
#else
|
#else
|
||||||
@@ -98,7 +98,7 @@ void send_client(void)
|
|||||||
#if 0
|
#if 0
|
||||||
myaddr.sin_addr.s_addr = HTONL(INADDR_LOOPBACK);
|
myaddr.sin_addr.s_addr = HTONL(INADDR_LOOPBACK);
|
||||||
#else
|
#else
|
||||||
myaddr.sin_addr.s_addr = HTONL(CONFIG_EXAMPLE_NETTEST_CLIENTIP);
|
myaddr.sin_addr.s_addr = HTONL(CONFIG_EXAMPLES_NETTEST_CLIENTIP);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
message("client: Connecting...\n");
|
message("client: Connecting...\n");
|
||||||
@@ -121,7 +121,7 @@ void send_client(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
|
#ifdef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
|
||||||
/* Then send messages forever */
|
/* Then send messages forever */
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
@@ -192,7 +192,7 @@ void send_client(void)
|
|||||||
|
|
||||||
close(sockfd);
|
close(sockfd);
|
||||||
free(outbuf);
|
free(outbuf);
|
||||||
#ifndef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
|
#ifndef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
|
||||||
free(inbuf);
|
free(inbuf);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
@@ -203,7 +203,7 @@ errout_with_socket:
|
|||||||
|
|
||||||
errout_with_buffers:
|
errout_with_buffers:
|
||||||
free(outbuf);
|
free(outbuf);
|
||||||
#ifndef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
|
#ifndef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
|
||||||
free(inbuf);
|
free(inbuf);
|
||||||
#endif
|
#endif
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ void recv_server(void)
|
|||||||
int acceptsd;
|
int acceptsd;
|
||||||
socklen_t addrlen;
|
socklen_t addrlen;
|
||||||
int nbytesread;
|
int nbytesread;
|
||||||
#ifndef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
|
#ifndef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
|
||||||
int totalbytesread;
|
int totalbytesread;
|
||||||
int nbytessent;
|
int nbytessent;
|
||||||
int ch;
|
int ch;
|
||||||
@@ -143,7 +143,7 @@ void recv_server(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
|
#ifdef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
|
||||||
/* Then receive data forever */
|
/* Then receive data forever */
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
|
|||||||
@@ -290,14 +290,14 @@ static inline bool net_mksocket(struct net_listener_s *nls)
|
|||||||
static void net_configure(void)
|
static void net_configure(void)
|
||||||
{
|
{
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
#if defined(CONFIG_EXAMPLE_POLL_NOMAC)
|
#if defined(CONFIG_EXAMPLES_POLL_NOMAC)
|
||||||
uint8_t mac[IFHWADDRLEN];
|
uint8_t mac[IFHWADDRLEN];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Configure uIP */
|
/* Configure uIP */
|
||||||
/* Many embedded network interfaces must have a software assigned MAC */
|
/* Many embedded network interfaces must have a software assigned MAC */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_POLL_NOMAC
|
#ifdef CONFIG_EXAMPLES_POLL_NOMAC
|
||||||
mac[0] = 0x00;
|
mac[0] = 0x00;
|
||||||
mac[1] = 0xe0;
|
mac[1] = 0xe0;
|
||||||
mac[2] = 0xde;
|
mac[2] = 0xde;
|
||||||
@@ -309,17 +309,17 @@ static void net_configure(void)
|
|||||||
|
|
||||||
/* Set up our host address */
|
/* Set up our host address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_POLL_IPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_IPADDR);
|
||||||
uip_sethostaddr("eth0", &addr);
|
uip_sethostaddr("eth0", &addr);
|
||||||
|
|
||||||
/* Set up the default router address */
|
/* Set up the default router address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_POLL_DRIPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_DRIPADDR);
|
||||||
uip_setdraddr("eth0", &addr);
|
uip_setdraddr("eth0", &addr);
|
||||||
|
|
||||||
/* Setup the subnet mask */
|
/* Setup the subnet mask */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_POLL_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_NETMASK);
|
||||||
uip_setnetmask("eth0", &addr);
|
uip_setnetmask("eth0", &addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,14 +83,14 @@
|
|||||||
static void net_configure(void)
|
static void net_configure(void)
|
||||||
{
|
{
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
#if defined(CONFIG_EXAMPLE_POLL_NOMAC)
|
#if defined(CONFIG_EXAMPLES_POLL_NOMAC)
|
||||||
uint8_t mac[IFHWADDRLEN];
|
uint8_t mac[IFHWADDRLEN];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Configure uIP */
|
/* Configure uIP */
|
||||||
/* Many embedded network interfaces must have a software assigned MAC */
|
/* Many embedded network interfaces must have a software assigned MAC */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_POLL_NOMAC
|
#ifdef CONFIG_EXAMPLES_POLL_NOMAC
|
||||||
mac[0] = 0x00;
|
mac[0] = 0x00;
|
||||||
mac[1] = 0xe0;
|
mac[1] = 0xe0;
|
||||||
mac[2] = 0xde;
|
mac[2] = 0xde;
|
||||||
@@ -102,17 +102,17 @@ static void net_configure(void)
|
|||||||
|
|
||||||
/* Set up our host address */
|
/* Set up our host address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_POLL_IPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_IPADDR);
|
||||||
uip_sethostaddr("eth0", &addr);
|
uip_sethostaddr("eth0", &addr);
|
||||||
|
|
||||||
/* Set up the default router address */
|
/* Set up the default router address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_POLL_DRIPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_DRIPADDR);
|
||||||
uip_setdraddr("eth0", &addr);
|
uip_setdraddr("eth0", &addr);
|
||||||
|
|
||||||
/* Setup the subnet mask */
|
/* Setup the subnet mask */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_POLL_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_NETMASK);
|
||||||
uip_setnetmask("eth0", &addr);
|
uip_setnetmask("eth0", &addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,32 +52,32 @@
|
|||||||
* Pre-processor Defintitions
|
* Pre-processor Defintitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_SENDMAIL_RECIPIENT
|
#ifndef CONFIG_EXAMPLES_SENDMAIL_RECIPIENT
|
||||||
# error "You must provice CONFIG_EXAMPLE_SENDMAIL_RECIPIENT"
|
# error "You must provice CONFIG_EXAMPLES_SENDMAIL_RECIPIENT"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_SENDMAIL_IPADDR
|
#ifndef CONFIG_EXAMPLES_SENDMAIL_IPADDR
|
||||||
# error "You must provice CONFIG_EXAMPLE_SENDMAIL_IPADDR"
|
# error "You must provice CONFIG_EXAMPLES_SENDMAIL_IPADDR"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_SENDMAIL_DRIPADDR
|
#ifndef CONFIG_EXAMPLES_SENDMAIL_DRIPADDR
|
||||||
# error "You must provice CONFIG_EXAMPLE_SENDMAIL_DRIPADDR"
|
# error "You must provice CONFIG_EXAMPLES_SENDMAIL_DRIPADDR"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_SENDMAIL_NETMASK
|
#ifndef CONFIG_EXAMPLES_SENDMAIL_NETMASK
|
||||||
# error "You must provice CONFIG_EXAMPLE_SENDMAIL_NETMASK"
|
# error "You must provice CONFIG_EXAMPLES_SENDMAIL_NETMASK"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_SENDMAIL_SENDER
|
#ifndef CONFIG_EXAMPLES_SENDMAIL_SENDER
|
||||||
# define CONFIG_EXAMPLE_SENDMAIL_SENDER "nuttx-testing@example.com"
|
# define CONFIG_EXAMPLES_SENDMAIL_SENDER "nuttx-testing@example.com"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_SENDMAIL_SUBJECT
|
#ifndef CONFIG_EXAMPLES_SENDMAIL_SUBJECT
|
||||||
# define CONFIG_EXAMPLE_SENDMAIL_SUBJECT "Testing SMTP from NuttX"
|
# define CONFIG_EXAMPLES_SENDMAIL_SUBJECT "Testing SMTP from NuttX"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_SENDMAIL_BODY
|
#ifndef CONFIG_EXAMPLES_SENDMAIL_BODY
|
||||||
# define CONFIG_EXAMPLE_SENDMAIL_BODY "Test message sent by NuttX"
|
# define CONFIG_EXAMPLES_SENDMAIL_BODY "Test message sent by NuttX"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -85,10 +85,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static const char g_host_name[] = "localhost";
|
static const char g_host_name[] = "localhost";
|
||||||
static const char g_recipient[] = CONFIG_EXAMPLE_SENDMAIL_RECIPIENT;
|
static const char g_recipient[] = CONFIG_EXAMPLES_SENDMAIL_RECIPIENT;
|
||||||
static const char g_sender[] = CONFIG_EXAMPLE_SENDMAIL_SENDER;
|
static const char g_sender[] = CONFIG_EXAMPLES_SENDMAIL_SENDER;
|
||||||
static const char g_subject[] = CONFIG_EXAMPLE_SENDMAIL_SUBJECT;
|
static const char g_subject[] = CONFIG_EXAMPLES_SENDMAIL_SUBJECT;
|
||||||
static const char g_msg_body[] = CONFIG_EXAMPLE_SENDMAIL_BODY "\r\n";
|
static const char g_msg_body[] = CONFIG_EXAMPLES_SENDMAIL_BODY "\r\n";
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
@@ -105,7 +105,7 @@ static const char g_msg_body[] = CONFIG_EXAMPLE_SENDMAIL_BODY "\r\n";
|
|||||||
int sendmail_main(int argc, char *argv[])
|
int sendmail_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
#if defined(CONFIG_EXAMPLE_SENDMAIL_NOMAC)
|
#if defined(CONFIG_EXAMPLES_SENDMAIL_NOMAC)
|
||||||
uint8_t mac[IFHWADDRLEN];
|
uint8_t mac[IFHWADDRLEN];
|
||||||
#endif
|
#endif
|
||||||
void *handle;
|
void *handle;
|
||||||
@@ -117,7 +117,7 @@ int sendmail_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Many embedded network interfaces must have a software assigned MAC */
|
/* Many embedded network interfaces must have a software assigned MAC */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_SENDMAIL_NOMAC
|
#ifdef CONFIG_EXAMPLES_SENDMAIL_NOMAC
|
||||||
mac[0] = 0x00;
|
mac[0] = 0x00;
|
||||||
mac[1] = 0xe0;
|
mac[1] = 0xe0;
|
||||||
mac[2] = 0xde;
|
mac[2] = 0xde;
|
||||||
@@ -129,17 +129,17 @@ int sendmail_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Set up our host address */
|
/* Set up our host address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_SENDMAIL_IPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_SENDMAIL_IPADDR);
|
||||||
uip_sethostaddr("eth0", &addr);
|
uip_sethostaddr("eth0", &addr);
|
||||||
|
|
||||||
/* Set up the default router address */
|
/* Set up the default router address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_SENDMAIL_DRIPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_SENDMAIL_DRIPADDR);
|
||||||
uip_setdraddr("eth0", &addr);
|
uip_setdraddr("eth0", &addr);
|
||||||
|
|
||||||
/* Setup the subnet mask */
|
/* Setup the subnet mask */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_SENDMAIL_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_SENDMAIL_NETMASK);
|
||||||
uip_setnetmask("eth0", &addr);
|
uip_setnetmask("eth0", &addr);
|
||||||
|
|
||||||
/* Then send the mail */
|
/* Then send the mail */
|
||||||
|
|||||||
@@ -186,13 +186,13 @@ int shell_session(int argc, char *argv[])
|
|||||||
static void shell_netinit(void)
|
static void shell_netinit(void)
|
||||||
{
|
{
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
#ifdef CONFIG_EXAMPLE_TELNETD_NOMAC
|
#ifdef CONFIG_EXAMPLES_TELNETD_NOMAC
|
||||||
uint8_t mac[IFHWADDRLEN];
|
uint8_t mac[IFHWADDRLEN];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Many embedded network interfaces must have a software assigned MAC */
|
/* Many embedded network interfaces must have a software assigned MAC */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_TELNETD_NOMAC
|
#ifdef CONFIG_EXAMPLES_TELNETD_NOMAC
|
||||||
mac[0] = 0x00;
|
mac[0] = 0x00;
|
||||||
mac[1] = 0xe0;
|
mac[1] = 0xe0;
|
||||||
mac[2] = 0xde;
|
mac[2] = 0xde;
|
||||||
@@ -204,17 +204,17 @@ static void shell_netinit(void)
|
|||||||
|
|
||||||
/* Set up our host address */
|
/* Set up our host address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_TELNETD_IPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_TELNETD_IPADDR);
|
||||||
uip_sethostaddr("eth0", &addr);
|
uip_sethostaddr("eth0", &addr);
|
||||||
|
|
||||||
/* Set up the default router address */
|
/* Set up the default router address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_TELNETD_DRIPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_TELNETD_DRIPADDR);
|
||||||
uip_setdraddr("eth0", &addr);
|
uip_setdraddr("eth0", &addr);
|
||||||
|
|
||||||
/* Setup the subnet mask */
|
/* Setup the subnet mask */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_TELNETD_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_TELNETD_NETMASK);
|
||||||
uip_setnetmask("eth0", &addr);
|
uip_setnetmask("eth0", &addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,12 +47,12 @@
|
|||||||
* Default: SCHED_PRIORITY_DEFAULT
|
* Default: SCHED_PRIORITY_DEFAULT
|
||||||
* CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE - Stack size allocated for the
|
* CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE - Stack size allocated for the
|
||||||
* Telnet client. Default: 2048
|
* Telnet client. Default: 2048
|
||||||
* CONFIG_EXAMPLE_TELNETD_NOMAC - If the hardware has no MAC address of its
|
* CONFIG_EXAMPLES_TELNETD_NOMAC - If the hardware has no MAC address of its
|
||||||
* own, define this =y to provide a bogus address for testing.
|
* own, define this =y to provide a bogus address for testing.
|
||||||
* CONFIG_EXAMPLE_TELNETD_IPADDR - The target IP address. Default 10.0.0.2
|
* CONFIG_EXAMPLES_TELNETD_IPADDR - The target IP address. Default 10.0.0.2
|
||||||
* CONFIG_EXAMPLE_TELNETD_DRIPADDR - The default router address. Default
|
* CONFIG_EXAMPLES_TELNETD_DRIPADDR - The default router address. Default
|
||||||
* 10.0.0.1
|
* 10.0.0.1
|
||||||
* CONFIG_EXAMPLE_TELNETD_NETMASK - The network mask. Default: 255.255.255.0
|
* CONFIG_EXAMPLES_TELNETD_NETMASK - The network mask. Default: 255.255.255.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLES_TELNETD_DAEMONPRIO
|
#ifndef CONFIG_EXAMPLES_TELNETD_DAEMONPRIO
|
||||||
@@ -71,14 +71,14 @@
|
|||||||
# define CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE 2048
|
# define CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE 2048
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_TELNETD_IPADDR
|
#ifndef CONFIG_EXAMPLES_TELNETD_IPADDR
|
||||||
# define CONFIG_EXAMPLE_TELNETD_IPADDR 0x0a000002
|
# define CONFIG_EXAMPLES_TELNETD_IPADDR 0x0a000002
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_EXAMPLE_TELNETD_DRIPADDR
|
#ifndef CONFIG_EXAMPLES_TELNETD_DRIPADDR
|
||||||
# define CONFIG_EXAMPLE_TELNETD_DRIPADDR 0x0a000002
|
# define CONFIG_EXAMPLES_TELNETD_DRIPADDR 0x0a000002
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_EXAMPLE_TELNETD_NETMASK
|
#ifndef CONFIG_EXAMPLES_TELNETD_NETMASK
|
||||||
# define CONFIG_EXAMPLE_TELNETD_NETMASK 0xffffff00
|
# define CONFIG_EXAMPLES_TELNETD_NETMASK 0xffffff00
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Other definitions ********************************************************/
|
/* Other definitions ********************************************************/
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
|
|
||||||
/* No MAC address operations */
|
/* No MAC address operations */
|
||||||
|
|
||||||
# undef CONFIG_EXAMPLE_THTTPD_NOMAC
|
# undef CONFIG_EXAMPLES_THTTPD_NOMAC
|
||||||
|
|
||||||
/* TTY device to use */
|
/* TTY device to use */
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ int g_thttpdnsymbols;
|
|||||||
int thttp_main(int argc, char *argv[])
|
int thttp_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
#ifdef CONFIG_EXAMPLE_THTTPD_NOMAC
|
#ifdef CONFIG_EXAMPLES_THTTPD_NOMAC
|
||||||
uint8_t mac[IFHWADDRLEN];
|
uint8_t mac[IFHWADDRLEN];
|
||||||
#endif
|
#endif
|
||||||
char *thttpd_argv = "thttpd";
|
char *thttpd_argv = "thttpd";
|
||||||
@@ -191,7 +191,7 @@ int thttp_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Many embedded network interfaces must have a software assigned MAC */
|
/* Many embedded network interfaces must have a software assigned MAC */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_THTTPD_NOMAC
|
#ifdef CONFIG_EXAMPLES_THTTPD_NOMAC
|
||||||
message("Assigning MAC\n");
|
message("Assigning MAC\n");
|
||||||
|
|
||||||
mac[0] = 0x00;
|
mac[0] = 0x00;
|
||||||
@@ -211,12 +211,12 @@ int thttp_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Set up the default router address */
|
/* Set up the default router address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_THTTPD_DRIPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_THTTPD_DRIPADDR);
|
||||||
uip_setdraddr(NET_DEVNAME, &addr);
|
uip_setdraddr(NET_DEVNAME, &addr);
|
||||||
|
|
||||||
/* Setup the subnet mask */
|
/* Setup the subnet mask */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_THTTPD_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_THTTPD_NETMASK);
|
||||||
uip_setnetmask(NET_DEVNAME, &addr);
|
uip_setnetmask(NET_DEVNAME, &addr);
|
||||||
|
|
||||||
/* Initialize the NXFLAT binary loader */
|
/* Initialize the NXFLAT binary loader */
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ include $(APPDIR)/Make.defs
|
|||||||
TARG_ASRCS =
|
TARG_ASRCS =
|
||||||
|
|
||||||
TARG_CSRCS = target.c
|
TARG_CSRCS = target.c
|
||||||
ifeq ($(CONFIG_EXAMPLE_UDP_SERVER),y)
|
ifeq ($(CONFIG_EXAMPLES_UDP_SERVER),y)
|
||||||
TARG_CSRCS += udp-server.c
|
TARG_CSRCS += udp-server.c
|
||||||
else
|
else
|
||||||
TARG_CSRCS += udp-client.c
|
TARG_CSRCS += udp-client.c
|
||||||
@@ -60,14 +60,14 @@ else
|
|||||||
TARG_BIN = "$(APPDIR)/libapps$(LIBEXT)"
|
TARG_BIN = "$(APPDIR)/libapps$(LIBEXT)"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
HOSTCFLAGS += -DCONFIG_EXAMPLE_UDP_HOST=1
|
HOSTCFLAGS += -DCONFIG_EXAMPLES_UDP_HOST=1
|
||||||
ifeq ($(CONFIG_EXAMPLE_UDP_SERVER),y)
|
ifeq ($(CONFIG_EXAMPLES_UDP_SERVER),y)
|
||||||
HOSTCFLAGS += -DCONFIG_EXAMPLE_UDP_SERVER=1 \
|
HOSTCFLAGS += -DCONFIG_EXAMPLES_UDP_SERVER=1 \
|
||||||
-DCONFIG_EXAMPLE_UDP_SERVERIP="$(CONFIG_EXAMPLE_UDP_SERVERIP)"
|
-DCONFIG_EXAMPLES_UDP_SERVERIP="$(CONFIG_EXAMPLES_UDP_SERVERIP)"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
HOST_SRCS = host.c
|
HOST_SRCS = host.c
|
||||||
ifeq ($(CONFIG_EXAMPLE_UDP_SERVER),y)
|
ifeq ($(CONFIG_EXAMPLES_UDP_SERVER),y)
|
||||||
HOST_SRCS += udp-client.c
|
HOST_SRCS += udp-client.c
|
||||||
else
|
else
|
||||||
HOST_SRCS += udp-server.c
|
HOST_SRCS += udp-server.c
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
int main(int argc, char **argv, char **envp)
|
int main(int argc, char **argv, char **envp)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_EXAMPLE_UDP_SERVER
|
#ifdef CONFIG_EXAMPLES_UDP_SERVER
|
||||||
send_client();
|
send_client();
|
||||||
#else
|
#else
|
||||||
recv_server();
|
recv_server();
|
||||||
|
|||||||
@@ -68,20 +68,20 @@ int udp_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Set up our host address */
|
/* Set up our host address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_UDP_IPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_UDP_IPADDR);
|
||||||
uip_sethostaddr("eth0", &addr);
|
uip_sethostaddr("eth0", &addr);
|
||||||
|
|
||||||
/* Set up the default router address */
|
/* Set up the default router address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_UDP_DRIPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_UDP_DRIPADDR);
|
||||||
uip_setdraddr("eth0", &addr);
|
uip_setdraddr("eth0", &addr);
|
||||||
|
|
||||||
/* Setup the subnet mask */
|
/* Setup the subnet mask */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_UDP_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_UDP_NETMASK);
|
||||||
uip_setnetmask("eth0", &addr);
|
uip_setnetmask("eth0", &addr);
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_UDP_SERVER
|
#ifdef CONFIG_EXAMPLES_UDP_SERVER
|
||||||
recv_server();
|
recv_server();
|
||||||
#else
|
#else
|
||||||
send_client();
|
send_client();
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ void send_client(void)
|
|||||||
|
|
||||||
server.sin_family = AF_INET;
|
server.sin_family = AF_INET;
|
||||||
server.sin_port = HTONS(PORTNO);
|
server.sin_port = HTONS(PORTNO);
|
||||||
server.sin_addr.s_addr = HTONL(CONFIG_EXAMPLE_UDP_SERVERIP);
|
server.sin_addr.s_addr = HTONL(CONFIG_EXAMPLES_UDP_SERVERIP);
|
||||||
|
|
||||||
message("client: %d. Sending %d bytes\n", offset, SENDSIZE);
|
message("client: %d. Sending %d bytes\n", offset, SENDSIZE);
|
||||||
nbytes = sendto(sockfd, outbuf, SENDSIZE, 0,
|
nbytes = sendto(sockfd, outbuf, SENDSIZE, 0,
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_UDP_HOST
|
#ifdef CONFIG_EXAMPLES_UDP_HOST
|
||||||
#else
|
#else
|
||||||
# include <debug.h>
|
# include <debug.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
* Definitions
|
* Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_UDP_HOST
|
#ifdef CONFIG_EXAMPLES_UDP_HOST
|
||||||
/* HTONS/L macros are unique to uIP */
|
/* HTONS/L macros are unique to uIP */
|
||||||
|
|
||||||
# define HTONS(a) htons(a)
|
# define HTONS(a) htons(a)
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
#include <apps/netutils/uiplib.h>
|
#include <apps/netutils/uiplib.h>
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_UIP_DHCPC
|
#ifdef CONFIG_EXAMPLES_UIP_DHCPC
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
|
|
||||||
/* DHCPC may be used in conjunction with any other feature (or not) */
|
/* DHCPC may be used in conjunction with any other feature (or not) */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_UIP_DHCPC
|
#ifdef CONFIG_EXAMPLES_UIP_DHCPC
|
||||||
# include <apps/netutils/resolv.h>
|
# include <apps/netutils/resolv.h>
|
||||||
# include <apps/netutils/dhcpc.h>
|
# include <apps/netutils/dhcpc.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -113,16 +113,16 @@
|
|||||||
int uip_main(int argc, char *argv[])
|
int uip_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
#if defined(CONFIG_EXAMPLE_UIP_DHCPC) || defined(CONFIG_EXAMPLE_UIP_NOMAC)
|
#if defined(CONFIG_EXAMPLES_UIP_DHCPC) || defined(CONFIG_EXAMPLES_UIP_NOMAC)
|
||||||
uint8_t mac[IFHWADDRLEN];
|
uint8_t mac[IFHWADDRLEN];
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_EXAMPLE_UIP_DHCPC
|
#ifdef CONFIG_EXAMPLES_UIP_DHCPC
|
||||||
void *handle;
|
void *handle;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Many embedded network interfaces must have a software assigned MAC */
|
/* Many embedded network interfaces must have a software assigned MAC */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_UIP_NOMAC
|
#ifdef CONFIG_EXAMPLES_UIP_NOMAC
|
||||||
mac[0] = 0x00;
|
mac[0] = 0x00;
|
||||||
mac[1] = 0xe0;
|
mac[1] = 0xe0;
|
||||||
mac[2] = 0xde;
|
mac[2] = 0xde;
|
||||||
@@ -134,24 +134,24 @@ int uip_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Set up our host address */
|
/* Set up our host address */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_UIP_DHCPC
|
#ifdef CONFIG_EXAMPLES_UIP_DHCPC
|
||||||
addr.s_addr = 0;
|
addr.s_addr = 0;
|
||||||
#else
|
#else
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_UIP_IPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_UIP_IPADDR);
|
||||||
#endif
|
#endif
|
||||||
uip_sethostaddr("eth0", &addr);
|
uip_sethostaddr("eth0", &addr);
|
||||||
|
|
||||||
/* Set up the default router address */
|
/* Set up the default router address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_UIP_DRIPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_UIP_DRIPADDR);
|
||||||
uip_setdraddr("eth0", &addr);
|
uip_setdraddr("eth0", &addr);
|
||||||
|
|
||||||
/* Setup the subnet mask */
|
/* Setup the subnet mask */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_UIP_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_UIP_NETMASK);
|
||||||
uip_setnetmask("eth0", &addr);
|
uip_setnetmask("eth0", &addr);
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_UIP_DHCPC
|
#ifdef CONFIG_EXAMPLES_UIP_DHCPC
|
||||||
/* Set up the resolver */
|
/* Set up the resolver */
|
||||||
|
|
||||||
resolv_init();
|
resolv_init();
|
||||||
|
|||||||
@@ -6,8 +6,32 @@
|
|||||||
config EXAMPLES_WGET
|
config EXAMPLES_WGET
|
||||||
bool "wget example"
|
bool "wget example"
|
||||||
default n
|
default n
|
||||||
|
depends on NET_TCP && !NSH_BUILTIN_APPS
|
||||||
---help---
|
---help---
|
||||||
Enable the wget example
|
Enable the wget example
|
||||||
|
|
||||||
if EXAMPLES_WGET
|
if EXAMPLES_WGET
|
||||||
|
|
||||||
|
config EXAMPLES_WGET_URL
|
||||||
|
string "File URL"
|
||||||
|
default ""
|
||||||
|
---help---
|
||||||
|
The URL of the file to get
|
||||||
|
|
||||||
|
config EXAMPLES_WGET_NOMAC
|
||||||
|
bool "Use Canned MAC Address"
|
||||||
|
default n
|
||||||
|
|
||||||
|
config EXAMPLES_WGET_IPADDR
|
||||||
|
hex "Target IP address"
|
||||||
|
default 0x0a000002
|
||||||
|
|
||||||
|
config EXAMPLES_WGET_DRIPADDR
|
||||||
|
hex "Default Router IP address (Gateway)"
|
||||||
|
default 0x0a000001
|
||||||
|
|
||||||
|
config EXAMPLES_WGET_NETMASK
|
||||||
|
hex "Network Mask"
|
||||||
|
default 0xffffff00
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
+12
-12
@@ -62,16 +62,16 @@
|
|||||||
* but there are default values for those so we cannot check them here.
|
* but there are default values for those so we cannot check them here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_WGET_IPADDR
|
#ifndef CONFIG_EXAMPLES_WGET_IPADDR
|
||||||
# error "You must define CONFIG_EXAMPLE_WGET_IPADDR"
|
# error "You must define CONFIG_EXAMPLES_WGET_IPADDR"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_WGET_DRIPADDR
|
#ifndef CONFIG_EXAMPLES_WGET_DRIPADDR
|
||||||
# error "You must define CONFIG_EXAMPLE_WGET_DRIPADDR"
|
# error "You must define CONFIG_EXAMPLES_WGET_DRIPADDR"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_WGET_NETMASK
|
#ifndef CONFIG_EXAMPLES_WGET_NETMASK
|
||||||
# error "You must define CONFIG_EXAMPLE_WGET_NETMASK"
|
# error "You must define CONFIG_EXAMPLES_WGET_NETMASK"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_NET
|
#ifndef CONFIG_NET
|
||||||
@@ -112,13 +112,13 @@ static void callback(FAR char **buffer, int offset, int datend,
|
|||||||
int wget_main(int argc, char *argv[])
|
int wget_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
#if defined(CONFIG_EXAMPLE_WGET_NOMAC)
|
#if defined(CONFIG_EXAMPLES_WGET_NOMAC)
|
||||||
uint8_t mac[IFHWADDRLEN];
|
uint8_t mac[IFHWADDRLEN];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Many embedded network interfaces must have a software assigned MAC */
|
/* Many embedded network interfaces must have a software assigned MAC */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_WGET_NOMAC
|
#ifdef CONFIG_EXAMPLES_WGET_NOMAC
|
||||||
mac[0] = 0x00;
|
mac[0] = 0x00;
|
||||||
mac[1] = 0xe0;
|
mac[1] = 0xe0;
|
||||||
mac[2] = 0xde;
|
mac[2] = 0xde;
|
||||||
@@ -130,21 +130,21 @@ int wget_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Set up our host address */
|
/* Set up our host address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_WGET_IPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_WGET_IPADDR);
|
||||||
uip_sethostaddr("eth0", &addr);
|
uip_sethostaddr("eth0", &addr);
|
||||||
|
|
||||||
/* Set up the default router address */
|
/* Set up the default router address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_WGET_DRIPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_WGET_DRIPADDR);
|
||||||
uip_setdraddr("eth0", &addr);
|
uip_setdraddr("eth0", &addr);
|
||||||
|
|
||||||
/* Setup the subnet mask */
|
/* Setup the subnet mask */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_WGET_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_WGET_NETMASK);
|
||||||
uip_setnetmask("eth0", &addr);
|
uip_setnetmask("eth0", &addr);
|
||||||
|
|
||||||
/* Then start the server */
|
/* Then start the server */
|
||||||
|
|
||||||
wget(CONFIG_EXAMPLE_WGET_URL, g_iobuffer, 512, callback, NULL);
|
wget(CONFIG_EXAMPLES_WGET_URL, g_iobuffer, 512, callback, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
/* DHCPC may be used in conjunction with any other feature (or not) */
|
/* DHCPC may be used in conjunction with any other feature (or not) */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_WLAN_DHCPC
|
#ifdef CONFIG_EXAMPLES_WLAN_DHCPC
|
||||||
# include <arpa/inet.h>
|
# include <arpa/inet.h>
|
||||||
# include <apps/netutils/resolv.h>
|
# include <apps/netutils/resolv.h>
|
||||||
# include <apps/netutils/dhcpc.h>
|
# include <apps/netutils/dhcpc.h>
|
||||||
@@ -131,11 +131,11 @@ static struct usbhost_driver_s *g_drvr;
|
|||||||
|
|
||||||
static inline void wlan_bringup(void)
|
static inline void wlan_bringup(void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_EXAMPLE_WLAN_DHCPC) || defined(CONFIG_EXAMPLE_WLAN_NOMAC)
|
#if defined(CONFIG_EXAMPLES_WLAN_DHCPC) || defined(CONFIG_EXAMPLES_WLAN_NOMAC)
|
||||||
uint8_t mac[IFHWADDRLEN];
|
uint8_t mac[IFHWADDRLEN];
|
||||||
#endif
|
#endif
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
#ifdef CONFIG_EXAMPLE_WLAN_DHCPC
|
#ifdef CONFIG_EXAMPLES_WLAN_DHCPC
|
||||||
void *handle;
|
void *handle;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ static inline void wlan_bringup(void)
|
|||||||
* MAC
|
* MAC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_WLAN_NOMAC
|
#ifdef CONFIG_EXAMPLES_WLAN_NOMAC
|
||||||
mac[0] = 0x00;
|
mac[0] = 0x00;
|
||||||
mac[1] = 0xe0;
|
mac[1] = 0xe0;
|
||||||
mac[2] = 0xde;
|
mac[2] = 0xde;
|
||||||
@@ -155,24 +155,24 @@ static inline void wlan_bringup(void)
|
|||||||
|
|
||||||
/* Set up the default router address */
|
/* Set up the default router address */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_WLAN_DRIPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_WLAN_DRIPADDR);
|
||||||
uip_setdraddr("eth0", &addr);
|
uip_setdraddr("eth0", &addr);
|
||||||
|
|
||||||
/* Setup the subnet mask */
|
/* Setup the subnet mask */
|
||||||
|
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_WLAN_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_WLAN_NETMASK);
|
||||||
uip_setnetmask("eth0", &addr);
|
uip_setnetmask("eth0", &addr);
|
||||||
|
|
||||||
/* Set up our host address */
|
/* Set up our host address */
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_WLAN_DHCPC
|
#ifdef CONFIG_EXAMPLES_WLAN_DHCPC
|
||||||
addr.s_addr = 0;
|
addr.s_addr = 0;
|
||||||
#else
|
#else
|
||||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_WLAN_IPADDR);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_WLAN_IPADDR);
|
||||||
#endif
|
#endif
|
||||||
uip_sethostaddr("eth0", &addr);
|
uip_sethostaddr("eth0", &addr);
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLE_WLAN_DHCPC
|
#ifdef CONFIG_EXAMPLES_WLAN_DHCPC
|
||||||
/* Set up the resolver */
|
/* Set up the resolver */
|
||||||
|
|
||||||
resolv_init();
|
resolv_init();
|
||||||
|
|||||||
@@ -3461,3 +3461,5 @@
|
|||||||
* board.h file for shenzhou, fire-stm32v2, and olimex-stm32-p107:
|
* board.h file for shenzhou, fire-stm32v2, and olimex-stm32-p107:
|
||||||
Add frequencies for HSE, HSI, LSE, and LSI. These are needed
|
Add frequencies for HSE, HSI, LSE, and LSI. These are needed
|
||||||
by the STM32 watchdog driver.
|
by the STM32 watchdog driver.
|
||||||
|
* CONFIG_EXAMPLES_*: To make things consistent, changed all occurrences
|
||||||
|
of CONFIG_EXAMPLE_* to CONFIG_EXAMPLES_*.
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
<li><a href="http://osmocom.org/" target="top">Osmocom-BB</a></li>
|
<li><a href="http://osmocom.org/" target="top">Osmocom-BB</a></li>
|
||||||
<li><a href="https://pixhawk.ethz.ch/px4/" target="top">PX4 Autopilot</a></li>
|
<li><a href="https://pixhawk.ethz.ch/px4/" target="top">PX4 Autopilot</a></li>
|
||||||
<li><a href="http://rgmp.sourceforge.net/wiki/index.php/Main_Page" target="top">RGMP</a></li>
|
<li><a href="http://rgmp.sourceforge.net/wiki/index.php/Main_Page" target="top">RGMP</a></li>
|
||||||
|
<li><a href="http://code.google.com/p/tmr/" target="top">Top Multi-Rotor (TMR)</a></li>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" valign="top" width="22">
|
<td align="center" valign="top" width="22">
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ extern int uipdriver_setmacaddr(unsigned char *macaddr);
|
|||||||
|
|
||||||
#define DEVTAP "/dev/net/tun"
|
#define DEVTAP "/dev/net/tun"
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_UIP_DHCPC
|
#ifndef CONFIG_EXAMPLES_UIP_DHCPC
|
||||||
# define UIP_IPADDR0 192
|
# define UIP_IPADDR0 192
|
||||||
# define UIP_IPADDR1 168
|
# define UIP_IPADDR1 168
|
||||||
# define UIP_IPADDR2 0
|
# define UIP_IPADDR2 0
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ extern int uipdriver_setmacaddr(unsigned char *macaddr);
|
|||||||
|
|
||||||
#define BUF ((struct uip_eth_hdr *)&uip_buf[0])
|
#define BUF ((struct uip_eth_hdr *)&uip_buf[0])
|
||||||
|
|
||||||
#ifndef CONFIG_EXAMPLE_UIP_DHCPC
|
#ifndef CONFIG_EXAMPLES_UIP_DHCPC
|
||||||
# define UIP_IPADDR (10 << 24 | 0 << 16 | 0 << 8 | 1)
|
# define UIP_IPADDR (10 << 24 | 0 << 16 | 0 << 8 | 1)
|
||||||
#else
|
#else
|
||||||
# define UIP_IPADDR (0)
|
# define UIP_IPADDR (0)
|
||||||
|
|||||||
@@ -318,21 +318,21 @@ CONFIG_USBMSC_REMOVABLE=y
|
|||||||
#
|
#
|
||||||
# Settings for examples/uip
|
# Settings for examples/uip
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_UIP_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_UIP_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_UIP_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_UIP_DHCPC=n
|
CONFIG_EXAMPLES_UIP_DHCPC=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nettest
|
# Settings for examples/nettest
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_NETTEST_SERVER=n
|
CONFIG_EXAMPLES_NETTEST_SERVER=n
|
||||||
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
|
CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
|
||||||
CONFIG_EXAMPLE_NETTEST_NOMAC=y
|
CONFIG_EXAMPLES_NETTEST_NOMAC=y
|
||||||
CONFIG_EXAMPLE_NETTEST_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_NETTEST_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_NETTEST_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_NETTEST_CLIENTIP=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/ostest
|
# Settings for examples/ostest
|
||||||
|
|||||||
@@ -341,20 +341,20 @@ CONFIG_USBMSC_REMOVABLE=y
|
|||||||
#
|
#
|
||||||
# Settings for examples/uip
|
# Settings for examples/uip
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_UIP_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_UIP_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_UIP_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_UIP_DHCPC=n
|
CONFIG_EXAMPLES_UIP_DHCPC=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nettest
|
# Settings for examples/nettest
|
||||||
CONFIG_EXAMPLE_NETTEST_SERVER=n
|
CONFIG_EXAMPLES_NETTEST_SERVER=n
|
||||||
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
|
CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
|
||||||
CONFIG_EXAMPLE_NETTEST_NOMAC=n
|
CONFIG_EXAMPLES_NETTEST_NOMAC=n
|
||||||
CONFIG_EXAMPLE_NETTEST_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_NETTEST_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_NETTEST_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_NETTEST_CLIENTIP=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/ostest
|
# Settings for examples/ostest
|
||||||
|
|||||||
@@ -341,20 +341,20 @@ CONFIG_USBMSC_REMOVABLE=y
|
|||||||
#
|
#
|
||||||
# Settings for examples/uip
|
# Settings for examples/uip
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_UIP_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_UIP_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_UIP_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_UIP_DHCPC=n
|
CONFIG_EXAMPLES_UIP_DHCPC=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nettest
|
# Settings for examples/nettest
|
||||||
CONFIG_EXAMPLE_NETTEST_SERVER=n
|
CONFIG_EXAMPLES_NETTEST_SERVER=n
|
||||||
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
|
CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
|
||||||
CONFIG_EXAMPLE_NETTEST_NOMAC=n
|
CONFIG_EXAMPLES_NETTEST_NOMAC=n
|
||||||
CONFIG_EXAMPLE_NETTEST_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_NETTEST_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_NETTEST_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_NETTEST_CLIENTIP=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/ostest
|
# Settings for examples/ostest
|
||||||
|
|||||||
@@ -210,21 +210,21 @@ CONFIG_NET_RESOLV_ENTRIES=4
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/uip
|
# Settings for examples/uip
|
||||||
CONFIG_EXAMPLE_UIP_NOMAC=y
|
CONFIG_EXAMPLES_UIP_NOMAC=y
|
||||||
CONFIG_EXAMPLE_UIP_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_UIP_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_UIP_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_UIP_DHCPC=y
|
CONFIG_EXAMPLES_UIP_DHCPC=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nettest
|
# Settings for examples/nettest
|
||||||
CONFIG_EXAMPLE_NETTEST_SERVER=n
|
CONFIG_EXAMPLES_NETTEST_SERVER=n
|
||||||
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
|
CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
|
||||||
CONFIG_EXAMPLE_NETTEST_NOMAC=y
|
CONFIG_EXAMPLES_NETTEST_NOMAC=y
|
||||||
CONFIG_EXAMPLE_NETTEST_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_NETTEST_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_NETTEST_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_NETTEST_CLIENTIP=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nsh
|
# Settings for examples/nsh
|
||||||
@@ -241,11 +241,11 @@ CONFIG_NSH_NETMASK=0xffffff00
|
|||||||
#
|
#
|
||||||
# Settings for examples/wget
|
# Settings for examples/wget
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_WGET_URL="http://www.nuttx.org/index.html"
|
CONFIG_EXAMPLES_WGET_URL="http://www.nuttx.org/index.html"
|
||||||
CONFIG_EXAMPLE_WGET_NOMAC=y
|
CONFIG_EXAMPLES_WGET_NOMAC=y
|
||||||
CONFIG_EXAMPLE_WGET_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_WGET_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_WGET_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_WGET_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_WGET_NETMASK=0xffffff00
|
||||||
|
|
||||||
#
|
#
|
||||||
# Stack and heap information
|
# Stack and heap information
|
||||||
|
|||||||
@@ -210,21 +210,21 @@ CONFIG_NET_RESOLV_ENTRIES=4
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/uip
|
# Settings for examples/uip
|
||||||
CONFIG_EXAMPLE_UIP_NOMAC=y
|
CONFIG_EXAMPLES_UIP_NOMAC=y
|
||||||
CONFIG_EXAMPLE_UIP_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_UIP_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_UIP_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_UIP_DHCPC=n
|
CONFIG_EXAMPLES_UIP_DHCPC=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nettest
|
# Settings for examples/nettest
|
||||||
CONFIG_EXAMPLE_NETTEST_SERVER=n
|
CONFIG_EXAMPLES_NETTEST_SERVER=n
|
||||||
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
|
CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
|
||||||
CONFIG_EXAMPLE_NETTEST_NOMAC=y
|
CONFIG_EXAMPLES_NETTEST_NOMAC=y
|
||||||
CONFIG_EXAMPLE_NETTEST_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_NETTEST_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_NETTEST_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_NETTEST_CLIENTIP=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nsh
|
# Settings for examples/nsh
|
||||||
@@ -241,11 +241,11 @@ CONFIG_NSH_NETMASK=0xffffff00
|
|||||||
#
|
#
|
||||||
# Settings for examples/wget
|
# Settings for examples/wget
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_WGET_URL="http://www.nuttx.org/index.html"
|
CONFIG_EXAMPLES_WGET_URL="http://www.nuttx.org/index.html"
|
||||||
CONFIG_EXAMPLE_WGET_NOMAC=y
|
CONFIG_EXAMPLES_WGET_NOMAC=y
|
||||||
CONFIG_EXAMPLE_WGET_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_WGET_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_WGET_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_WGET_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_WGET_NETMASK=0xffffff00
|
||||||
|
|
||||||
#
|
#
|
||||||
# Stack and heap information
|
# Stack and heap information
|
||||||
|
|||||||
@@ -210,21 +210,21 @@ CONFIG_NET_RESOLV_ENTRIES=4
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/uip
|
# Settings for examples/uip
|
||||||
CONFIG_EXAMPLE_UIP_NOMAC=y
|
CONFIG_EXAMPLES_UIP_NOMAC=y
|
||||||
CONFIG_EXAMPLE_UIP_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_UIP_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_UIP_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_UIP_DHCPC=n
|
CONFIG_EXAMPLES_UIP_DHCPC=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nettest
|
# Settings for examples/nettest
|
||||||
CONFIG_EXAMPLE_NETTEST_SERVER=n
|
CONFIG_EXAMPLES_NETTEST_SERVER=n
|
||||||
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
|
CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
|
||||||
CONFIG_EXAMPLE_NETTEST_NOMAC=y
|
CONFIG_EXAMPLES_NETTEST_NOMAC=y
|
||||||
CONFIG_EXAMPLE_NETTEST_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_NETTEST_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_NETTEST_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_NETTEST_CLIENTIP=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nsh
|
# Settings for examples/nsh
|
||||||
@@ -241,11 +241,11 @@ CONFIG_NSH_NETMASK=0xffffff00
|
|||||||
#
|
#
|
||||||
# Settings for examples/wget
|
# Settings for examples/wget
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_WGET_URL="http://www.nuttx.org/index.html"
|
CONFIG_EXAMPLES_WGET_URL="http://www.nuttx.org/index.html"
|
||||||
CONFIG_EXAMPLE_WGET_NOMAC=y
|
CONFIG_EXAMPLES_WGET_NOMAC=y
|
||||||
CONFIG_EXAMPLE_WGET_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_WGET_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_WGET_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_WGET_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_WGET_NETMASK=0xffffff00
|
||||||
|
|
||||||
#
|
#
|
||||||
# Stack and heap information
|
# Stack and heap information
|
||||||
|
|||||||
@@ -210,21 +210,21 @@ CONFIG_NET_RESOLV_ENTRIES=4
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/uip
|
# Settings for examples/uip
|
||||||
CONFIG_EXAMPLE_UIP_NOMAC=y
|
CONFIG_EXAMPLES_UIP_NOMAC=y
|
||||||
CONFIG_EXAMPLE_UIP_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_UIP_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_UIP_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_UIP_DHCPC=n
|
CONFIG_EXAMPLES_UIP_DHCPC=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nettest
|
# Settings for examples/nettest
|
||||||
CONFIG_EXAMPLE_NETTEST_SERVER=n
|
CONFIG_EXAMPLES_NETTEST_SERVER=n
|
||||||
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
|
CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
|
||||||
CONFIG_EXAMPLE_NETTEST_NOMAC=y
|
CONFIG_EXAMPLES_NETTEST_NOMAC=y
|
||||||
CONFIG_EXAMPLE_NETTEST_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_NETTEST_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_NETTEST_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_NETTEST_CLIENTIP=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nsh
|
# Settings for examples/nsh
|
||||||
@@ -241,11 +241,11 @@ CONFIG_NSH_NETMASK=0xffffff00
|
|||||||
#
|
#
|
||||||
# Settings for examples/wget
|
# Settings for examples/wget
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_WGET_URL="http://www.nuttx.org/index.html"
|
CONFIG_EXAMPLES_WGET_URL="http://www.nuttx.org/index.html"
|
||||||
CONFIG_EXAMPLE_WGET_NOMAC=y
|
CONFIG_EXAMPLES_WGET_NOMAC=y
|
||||||
CONFIG_EXAMPLE_WGET_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_WGET_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_WGET_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_WGET_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_WGET_NETMASK=0xffffff00
|
||||||
|
|
||||||
#
|
#
|
||||||
# Stack and heap information
|
# Stack and heap information
|
||||||
|
|||||||
@@ -223,21 +223,21 @@ CONFIG_NET_RESOLV_ENTRIES=4
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/uip
|
# Settings for examples/uip
|
||||||
CONFIG_EXAMPLE_UIP_NOMAC=y
|
CONFIG_EXAMPLES_UIP_NOMAC=y
|
||||||
CONFIG_EXAMPLE_UIP_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_UIP_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_UIP_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_UIP_DHCPC=n
|
CONFIG_EXAMPLES_UIP_DHCPC=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nettest
|
# Settings for examples/nettest
|
||||||
CONFIG_EXAMPLE_NETTEST_SERVER=n
|
CONFIG_EXAMPLES_NETTEST_SERVER=n
|
||||||
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
|
CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
|
||||||
CONFIG_EXAMPLE_NETTEST_NOMAC=y
|
CONFIG_EXAMPLES_NETTEST_NOMAC=y
|
||||||
CONFIG_EXAMPLE_NETTEST_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_NETTEST_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_NETTEST_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_NETTEST_CLIENTIP=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nsh
|
# Settings for examples/nsh
|
||||||
@@ -260,11 +260,11 @@ CONFIG_EXAMPLES_HELLO_BUILTIN=y
|
|||||||
#
|
#
|
||||||
# Settings for examples/wget
|
# Settings for examples/wget
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_WGET_URL="http://www.nuttx.org/index.html"
|
CONFIG_EXAMPLES_WGET_URL="http://www.nuttx.org/index.html"
|
||||||
CONFIG_EXAMPLE_WGET_NOMAC=y
|
CONFIG_EXAMPLES_WGET_NOMAC=y
|
||||||
CONFIG_EXAMPLE_WGET_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_WGET_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_WGET_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_WGET_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_WGET_NETMASK=0xffffff00
|
||||||
|
|
||||||
#
|
#
|
||||||
# Stack and heap information
|
# Stack and heap information
|
||||||
|
|||||||
@@ -229,21 +229,21 @@ CONFIG_EXAMPLES_HELLO_BUILTIN=y
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/uip
|
# Settings for examples/uip
|
||||||
CONFIG_EXAMPLE_UIP_NOMAC=y
|
CONFIG_EXAMPLES_UIP_NOMAC=y
|
||||||
CONFIG_EXAMPLE_UIP_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_UIP_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_UIP_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_UIP_DHCPC=n
|
CONFIG_EXAMPLES_UIP_DHCPC=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nettest
|
# Settings for examples/nettest
|
||||||
CONFIG_EXAMPLE_NETTEST_SERVER=n
|
CONFIG_EXAMPLES_NETTEST_SERVER=n
|
||||||
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
|
CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
|
||||||
CONFIG_EXAMPLE_NETTEST_NOMAC=y
|
CONFIG_EXAMPLES_NETTEST_NOMAC=y
|
||||||
CONFIG_EXAMPLE_NETTEST_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_NETTEST_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_NETTEST_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_NETTEST_CLIENTIP=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nsh
|
# Settings for examples/nsh
|
||||||
@@ -262,11 +262,11 @@ CONFIG_NSH_BUILTIN_APPS=y
|
|||||||
#
|
#
|
||||||
# Settings for examples/wget
|
# Settings for examples/wget
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_WGET_URL="http://www.nuttx.org/index.html"
|
CONFIG_EXAMPLES_WGET_URL="http://www.nuttx.org/index.html"
|
||||||
CONFIG_EXAMPLE_WGET_NOMAC=y
|
CONFIG_EXAMPLES_WGET_NOMAC=y
|
||||||
CONFIG_EXAMPLE_WGET_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_WGET_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_WGET_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_WGET_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_WGET_NETMASK=0xffffff00
|
||||||
|
|
||||||
#
|
#
|
||||||
# Stack and heap information
|
# Stack and heap information
|
||||||
|
|||||||
@@ -226,21 +226,21 @@ CONFIG_NET_RESOLV_ENTRIES=4
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/uip
|
# Settings for examples/uip
|
||||||
CONFIG_EXAMPLE_UIP_NOMAC=y
|
CONFIG_EXAMPLES_UIP_NOMAC=y
|
||||||
CONFIG_EXAMPLE_UIP_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_UIP_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_UIP_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_UIP_DHCPC=n
|
CONFIG_EXAMPLES_UIP_DHCPC=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nettest
|
# Settings for examples/nettest
|
||||||
CONFIG_EXAMPLE_NETTEST_SERVER=n
|
CONFIG_EXAMPLES_NETTEST_SERVER=n
|
||||||
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
|
CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
|
||||||
CONFIG_EXAMPLE_NETTEST_NOMAC=y
|
CONFIG_EXAMPLES_NETTEST_NOMAC=y
|
||||||
CONFIG_EXAMPLE_NETTEST_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_NETTEST_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_NETTEST_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_NETTEST_CLIENTIP=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nsh
|
# Settings for examples/nsh
|
||||||
@@ -306,11 +306,11 @@ CONFIG_EXAMPLES_NXTEXT_DEVNO=0
|
|||||||
#
|
#
|
||||||
# Settings for examples/wget
|
# Settings for examples/wget
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_WGET_URL="http://www.nuttx.org/index.html"
|
CONFIG_EXAMPLES_WGET_URL="http://www.nuttx.org/index.html"
|
||||||
CONFIG_EXAMPLE_WGET_NOMAC=y
|
CONFIG_EXAMPLES_WGET_NOMAC=y
|
||||||
CONFIG_EXAMPLE_WGET_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_WGET_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_WGET_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_WGET_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_WGET_NETMASK=0xffffff00
|
||||||
|
|
||||||
#
|
#
|
||||||
# Stack and heap information
|
# Stack and heap information
|
||||||
|
|||||||
@@ -311,20 +311,20 @@ CONFIG_USBMSC_REMOVABLE=y
|
|||||||
#
|
#
|
||||||
# Settings for examples/uip
|
# Settings for examples/uip
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_UIP_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_UIP_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_UIP_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_UIP_DHCPC=n
|
CONFIG_EXAMPLES_UIP_DHCPC=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nettest
|
# Settings for examples/nettest
|
||||||
CONFIG_EXAMPLE_NETTEST_SERVER=n
|
CONFIG_EXAMPLES_NETTEST_SERVER=n
|
||||||
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
|
CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
|
||||||
CONFIG_EXAMPLE_NETTEST_NOMAC=n
|
CONFIG_EXAMPLES_NETTEST_NOMAC=n
|
||||||
CONFIG_EXAMPLE_NETTEST_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_NETTEST_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_NETTEST_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_NETTEST_CLIENTIP=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/ostest
|
# Settings for examples/ostest
|
||||||
|
|||||||
@@ -312,21 +312,21 @@ CONFIG_USBMSC_REMOVABLE=y
|
|||||||
#
|
#
|
||||||
# Settings for examples/uip
|
# Settings for examples/uip
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_UIP_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_UIP_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_UIP_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_UIP_DHCPC=n
|
CONFIG_EXAMPLES_UIP_DHCPC=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nettest
|
# Settings for examples/nettest
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_NETTEST_SERVER=n
|
CONFIG_EXAMPLES_NETTEST_SERVER=n
|
||||||
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
|
CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
|
||||||
CONFIG_EXAMPLE_NETTEST_NOMAC=n
|
CONFIG_EXAMPLES_NETTEST_NOMAC=n
|
||||||
CONFIG_EXAMPLE_NETTEST_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_NETTEST_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_NETTEST_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_NETTEST_CLIENTIP=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/ostest
|
# Settings for examples/ostest
|
||||||
|
|||||||
@@ -312,21 +312,21 @@ CONFIG_USBMSC_REMOVABLE=y
|
|||||||
#
|
#
|
||||||
# Settings for examples/uip
|
# Settings for examples/uip
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_UIP_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_UIP_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_UIP_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_UIP_DHCPC=n
|
CONFIG_EXAMPLES_UIP_DHCPC=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/nettest
|
# Settings for examples/nettest
|
||||||
#
|
#
|
||||||
CONFIG_EXAMPLE_NETTEST_SERVER=n
|
CONFIG_EXAMPLES_NETTEST_SERVER=n
|
||||||
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
|
CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
|
||||||
CONFIG_EXAMPLE_NETTEST_NOMAC=n
|
CONFIG_EXAMPLES_NETTEST_NOMAC=n
|
||||||
CONFIG_EXAMPLE_NETTEST_IPADDR=0x0a000002
|
CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
|
||||||
CONFIG_EXAMPLE_NETTEST_DRIPADDR=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
|
||||||
CONFIG_EXAMPLE_NETTEST_NETMASK=0xffffff00
|
CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
|
||||||
CONFIG_EXAMPLE_NETTEST_CLIENTIP=0x0a000001
|
CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/ostest
|
# Settings for examples/ostest
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user