mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 00:33:33 +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:
@@ -42,7 +42,7 @@ include $(APPDIR)/Make.defs
|
||||
TARG_ASRCS =
|
||||
|
||||
TARG_CSRCS = target.c
|
||||
ifeq ($(CONFIG_EXAMPLE_UDP_SERVER),y)
|
||||
ifeq ($(CONFIG_EXAMPLES_UDP_SERVER),y)
|
||||
TARG_CSRCS += udp-server.c
|
||||
else
|
||||
TARG_CSRCS += udp-client.c
|
||||
@@ -60,14 +60,14 @@ else
|
||||
TARG_BIN = "$(APPDIR)/libapps$(LIBEXT)"
|
||||
endif
|
||||
|
||||
HOSTCFLAGS += -DCONFIG_EXAMPLE_UDP_HOST=1
|
||||
ifeq ($(CONFIG_EXAMPLE_UDP_SERVER),y)
|
||||
HOSTCFLAGS += -DCONFIG_EXAMPLE_UDP_SERVER=1 \
|
||||
-DCONFIG_EXAMPLE_UDP_SERVERIP="$(CONFIG_EXAMPLE_UDP_SERVERIP)"
|
||||
HOSTCFLAGS += -DCONFIG_EXAMPLES_UDP_HOST=1
|
||||
ifeq ($(CONFIG_EXAMPLES_UDP_SERVER),y)
|
||||
HOSTCFLAGS += -DCONFIG_EXAMPLES_UDP_SERVER=1 \
|
||||
-DCONFIG_EXAMPLES_UDP_SERVERIP="$(CONFIG_EXAMPLES_UDP_SERVERIP)"
|
||||
endif
|
||||
|
||||
HOST_SRCS = host.c
|
||||
ifeq ($(CONFIG_EXAMPLE_UDP_SERVER),y)
|
||||
ifeq ($(CONFIG_EXAMPLES_UDP_SERVER),y)
|
||||
HOST_SRCS += udp-client.c
|
||||
else
|
||||
HOST_SRCS += udp-server.c
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
int main(int argc, char **argv, char **envp)
|
||||
{
|
||||
#ifdef CONFIG_EXAMPLE_UDP_SERVER
|
||||
#ifdef CONFIG_EXAMPLES_UDP_SERVER
|
||||
send_client();
|
||||
#else
|
||||
recv_server();
|
||||
|
||||
@@ -68,20 +68,20 @@ int udp_main(int argc, char *argv[])
|
||||
|
||||
/* 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);
|
||||
|
||||
/* 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);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_UDP_NETMASK);
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_UDP_NETMASK);
|
||||
uip_setnetmask("eth0", &addr);
|
||||
|
||||
#ifdef CONFIG_EXAMPLE_UDP_SERVER
|
||||
#ifdef CONFIG_EXAMPLES_UDP_SERVER
|
||||
recv_server();
|
||||
#else
|
||||
send_client();
|
||||
|
||||
@@ -102,7 +102,7 @@ void send_client(void)
|
||||
|
||||
server.sin_family = AF_INET;
|
||||
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);
|
||||
nbytes = sendto(sockfd, outbuf, SENDSIZE, 0,
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_EXAMPLE_UDP_HOST
|
||||
#ifdef CONFIG_EXAMPLES_UDP_HOST
|
||||
#else
|
||||
# include <debug.h>
|
||||
#endif
|
||||
@@ -49,7 +49,7 @@
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_EXAMPLE_UDP_HOST
|
||||
#ifdef CONFIG_EXAMPLES_UDP_HOST
|
||||
/* HTONS/L macros are unique to uIP */
|
||||
|
||||
# define HTONS(a) htons(a)
|
||||
|
||||
Reference in New Issue
Block a user