summaryrefslogtreecommitdiff
path: root/nuttx/drivers/net
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-05-01 19:21:06 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-05-01 19:21:06 +0000
commit48bbe68916ccaf0d2fa050e945bf650384ca624f (patch)
tree5ff4e297d474b0895f26eacea85ea37ad9afdf1a /nuttx/drivers/net
parentf7e838b2a215afb0e16257edd98fa6e9bbb5352a (diff)
downloadpx4-nuttx-48bbe68916ccaf0d2fa050e945bf650384ca624f.tar.gz
px4-nuttx-48bbe68916ccaf0d2fa050e945bf650384ca624f.tar.bz2
px4-nuttx-48bbe68916ccaf0d2fa050e945bf650384ca624f.zip
Add nettest config for str-p711 using enc28j60
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2642 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/net')
-rwxr-xr-xnuttx/drivers/net/enc28j60.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c
index 70a9ad937..3e3d59112 100755
--- a/nuttx/drivers/net/enc28j60.c
+++ b/nuttx/drivers/net/enc28j60.c
@@ -75,6 +75,7 @@
/* All SPI settings can be specifed in the configuration. If not, some
* defaults will be provided.
*
+ * CONFIG_NET_ENC28J60 - Enabled ENC28J60 support
* CONFIG_ENC28J60_OWNBUS - Set if the ENC28J60 is the only active device on
* the SPI bus. No locking or SPI configuration will be performed. All
* transfers will be performed from the ENC2J60 interrupt handler.
@@ -82,6 +83,12 @@
* CONFIG_ENC28J60_FREQUENCY - Define to use a different bus frequency
* CONFIG_ENC28J60_NINTERFACES - Specifies the number of physical ENC28J60
* devices that will be supported.
+ * CONFIG_ENC28J60_STATS - Collect network statistics
+ * CONFOG_ENC28J60_HALFDUPPLEX - Default is full duplex
+ */
+
+/* The ENC28J60 spec says that is supports SPI mode 0,0 only. However,
+ * somtimes you need to tinker with these things.
*/
#ifndef CONFIG_ENC28J60_SPIMODE
@@ -358,7 +365,7 @@ static void enc_select(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_ENC28J60_SPIMODE);
SPI_SETBITS(spi, 8);
#ifdef CONFIG_ENC28J60_FREQUENCY
- SPI_SETFREQUENCY(spi, CONFIG_ENC28J60_FREQUENCY)
+ SPI_SETFREQUENCY(spi, CONFIG_ENC28J60_FREQUENCY);
#endif
}
#endif
@@ -909,12 +916,6 @@ static int enc_transmit(FAR struct enc_driver_s *priv)
*/
(void)wd_start(priv->txtimeout, ENC_TXTIMEOUT, enc_txtimeout, 1, (uint32_t)priv);
-
- /* Increment statistics */
-
-#ifdef CONFIG_ENC28J60_STATS
- priv->txqueued++;
-#endif
return OK;
}
@@ -1425,7 +1426,7 @@ static void enc_worker(FAR void *arg)
if (pktcnt > 0)
{
#ifdef CONFIG_ENC28J60_STATS
- if (pkcnt > priv->stats.maxpktcnt)
+ if (pktcnt > priv->stats.maxpktcnt)
{
priv->stats.maxpktcnt = pktcnt;
}