summaryrefslogtreecommitdiff
path: root/nuttx/drivers/net
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-12-04 17:11:55 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-12-04 17:11:55 +0000
commitd9c3513a33419a4cb6de9b3e39084989709584c1 (patch)
treeae164e1b32d440051b1581af871f523d6f34d702 /nuttx/drivers/net
parent06e5392650035245f70c576a39a46dc7306add2c (diff)
downloadpx4-nuttx-d9c3513a33419a4cb6de9b3e39084989709584c1.tar.gz
px4-nuttx-d9c3513a33419a4cb6de9b3e39084989709584c1.tar.bz2
px4-nuttx-d9c3513a33419a4cb6de9b3e39084989709584c1.zip
Add c5471 Ethernet driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@423 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/net')
-rw-r--r--nuttx/drivers/net/skeleton.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/nuttx/drivers/net/skeleton.c b/nuttx/drivers/net/skeleton.c
index 2789173ea..7dfb0f95a 100644
--- a/nuttx/drivers/net/skeleton.c
+++ b/nuttx/drivers/net/skeleton.c
@@ -38,15 +38,7 @@
****************************************************************************/
#include <nuttx/config.h>
-#if defined(CONFIG_NET) && defined(CONFIG_NET_skeleton)
-
-/* CONFIG_skeleton_NINTERFACES determines the number of physical interfaces
- * that will be supported.
- */
-
-#ifndef CONFIG_skeleton_NINTERFACES
-# define CONFIG_skeleton_NINTERFACES 1
-#endif
+#if defined(CONFIG_NET) && defined(CONFIG_skeleton_NET)
#include <time.h>
#include <string.h>
@@ -65,6 +57,14 @@
* Definitions
****************************************************************************/
+/* CONFIG_skeleton_NINTERFACES determines the number of physical interfaces
+ * that will be supported.
+ */
+
+#ifndef CONFIG_skeleton_NINTERFACES
+# define CONFIG_skeleton_NINTERFACES 1
+#endif
+
/* TX poll deley = 1 seconds. CLK_TCK is the number of clock ticks per second */
#define skeleton_WDDELAY (1*CLK_TCK)
@@ -82,8 +82,8 @@
* Private Types
****************************************************************************/
-/* The skel_driver_s encapsulates all DM90x0 state information for a single
- * DM90x0 hardware interface
+/* The skel_driver_s encapsulates all state information for a single hardware
+ * interface
*/
struct skel_driver_s
@@ -158,7 +158,7 @@ static int skel_transmit(struct skel_driver_s *skel)
/* Disable Ethernet interrupts */
- /* Send the packet: address=skel->sk_dev.d_buf, length=skel_dev.d_len */
+ /* Send the packet: address=skel->sk_dev.d_buf, length=skel->sk_dev.d_len */
/* Restore Ethernet interrupts */
@@ -239,7 +239,7 @@ static void skel_receive(struct skel_driver_s *skel)
/* Check if the packet is a valid size for the uIP buffer configuration */
/* Copy the data data from the hardware to skel->sk_dev.d_buf. Set
- * amount of data in skel_dev.d_len
+ * amount of data in skel->sk_dev.d_len
*/
/* We only accept IP packets of the configured type and ARP packets */
@@ -589,5 +589,5 @@ int skel_initialize(void)
return OK;
}
-#endif /* CONFIG_NET && CONFIG_NET_skeleton */
+#endif /* CONFIG_NET && CONFIG_skeleton_NET */