summaryrefslogtreecommitdiff
path: root/nuttx/arch
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-09-01 18:06:15 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-09-01 18:06:15 +0000
commit5d303ec17efc511d8cfe0919a790b44e24a8aad9 (patch)
tree76c519b5903e6d1e2880f7fb0d403838f7acddac /nuttx/arch
parent0cab5d84f146c0f6105192db5593aa4019edcdcf (diff)
downloadpx4-nuttx-5d303ec17efc511d8cfe0919a790b44e24a8aad9.tar.gz
px4-nuttx-5d303ec17efc511d8cfe0919a790b44e24a8aad9.tar.bz2
px4-nuttx-5d303ec17efc511d8cfe0919a790b44e24a8aad9.zip
Added support for socket descriptors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@318 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch')
-rw-r--r--nuttx/arch/sim/src/Makefile2
-rw-r--r--nuttx/arch/sim/src/up_idle.c2
-rw-r--r--nuttx/arch/sim/src/up_initialize.c2
-rw-r--r--nuttx/arch/sim/src/up_internal.h4
-rw-r--r--nuttx/arch/sim/src/up_uipdriver.c10
5 files changed, 10 insertions, 10 deletions
diff --git a/nuttx/arch/sim/src/Makefile b/nuttx/arch/sim/src/Makefile
index f9eaeac49..75ea07eee 100644
--- a/nuttx/arch/sim/src/Makefile
+++ b/nuttx/arch/sim/src/Makefile
@@ -49,7 +49,7 @@ CSRCS = up_initialize.c up_idle.c up_interruptcontext.c \
ifeq ($(CONFIG_FS_FAT),y)
CSRCS += up_blockdevice.c up_deviceimage.c
endif
-ifeq ($(CONFIG_NET_UIP),y)
+ifeq ($(CONFIG_NET),y)
CSRCS += up_uipdriver.c
SPECSRCS += up_tapdev.c
endif
diff --git a/nuttx/arch/sim/src/up_idle.c b/nuttx/arch/sim/src/up_idle.c
index 95e119240..01457962e 100644
--- a/nuttx/arch/sim/src/up_idle.c
+++ b/nuttx/arch/sim/src/up_idle.c
@@ -83,7 +83,7 @@ void up_idle(void)
/* Run the network if enabled */
-#ifdef CONFIG_NET_UIP
+#ifdef CONFIG_NET
uipdriver_loop();
#endif
}
diff --git a/nuttx/arch/sim/src/up_initialize.c b/nuttx/arch/sim/src/up_initialize.c
index 427360c10..a7faa5032 100644
--- a/nuttx/arch/sim/src/up_initialize.c
+++ b/nuttx/arch/sim/src/up_initialize.c
@@ -86,7 +86,7 @@ void up_initialize(void)
devnull_register(); /* Standard /dev/null */
up_devconsole(); /* Our private /dev/console */
up_registerblockdevice(); /* Our simulated block device /dev/blkdev */
-#ifdef CONFIG_NET_UIP
+#ifdef CONFIG_NET
uipdriver_init(); /* Our "real" netwok driver */
#endif
}
diff --git a/nuttx/arch/sim/src/up_internal.h b/nuttx/arch/sim/src/up_internal.h
index f2a7512a0..f2a2b65cb 100644
--- a/nuttx/arch/sim/src/up_internal.h
+++ b/nuttx/arch/sim/src/up_internal.h
@@ -109,7 +109,7 @@ extern char *up_deviceimage(void);
/* up_tapdev.c ************************************************************/
-#ifdef CONFIG_NET_UIP
+#ifdef CONFIG_NET
extern unsigned long up_getwalltime( void );
extern void tapdev_init(void);
extern unsigned int tapdev_read(char *buf, unsigned int buflen);
@@ -118,7 +118,7 @@ extern void tapdev_send(char *buf, unsigned int buflen);
/* up_uipdriver.c *********************************************************/
-#ifdef CONFIG_NET_UIP
+#ifdef CONFIG_NET
extern int uipdriver_init(void);
extern void uipdriver_loop(void);
#endif
diff --git a/nuttx/arch/sim/src/up_uipdriver.c b/nuttx/arch/sim/src/up_uipdriver.c
index 883207ab4..5309b89c4 100644
--- a/nuttx/arch/sim/src/up_uipdriver.c
+++ b/nuttx/arch/sim/src/up_uipdriver.c
@@ -106,7 +106,7 @@ void uipdriver_loop(void)
{
int i;
- uip_len = tapdev_read(uip_buf, UIP_BUFSIZE);
+ uip_len = tapdev_read((char*)uip_buf, UIP_BUFSIZE);
if (uip_len > 0)
{
if (BUF->type == htons(UIP_ETHTYPE_IP))
@@ -122,7 +122,7 @@ void uipdriver_loop(void)
if (uip_len > 0)
{
uip_arp_out();
- tapdev_send(uip_buf, uip_len);
+ tapdev_send((char*)uip_buf, uip_len);
}
}
else if (BUF->type == htons(UIP_ETHTYPE_ARP))
@@ -136,7 +136,7 @@ void uipdriver_loop(void)
if (uip_len > 0)
{
- tapdev_send(uip_buf, uip_len);
+ tapdev_send((char*)uip_buf, uip_len);
}
}
}
@@ -155,7 +155,7 @@ void uipdriver_loop(void)
if (uip_len > 0)
{
uip_arp_out();
- tapdev_send(uip_buf, uip_len);
+ tapdev_send((char*)uip_buf, uip_len);
}
}
@@ -172,7 +172,7 @@ void uipdriver_loop(void)
if (uip_len > 0)
{
uip_arp_out();
- tapdev_send(uip_buf, uip_len);
+ tapdev_send((char*)uip_buf, uip_len);
}
}
#endif /* UIP_UDP */