diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-06-25 17:44:35 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-06-25 17:44:35 +0000 |
commit | 018ff6e65dcc563321d27d010e693dd8413e2f45 (patch) | |
tree | cd6fc22d2130b328328f2aeef39b8758673ec132 /nuttx/drivers | |
parent | 50d5e799e29f7d1da649d43fee8382cdffe3fc89 (diff) | |
download | px4-nuttx-018ff6e65dcc563321d27d010e693dd8413e2f45.tar.gz px4-nuttx-018ff6e65dcc563321d27d010e693dd8413e2f45.tar.bz2 px4-nuttx-018ff6e65dcc563321d27d010e693dd8413e2f45.zip |
Consolidate buffer dumping; fix all occurrences of 'the the'
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1951 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers')
-rw-r--r-- | nuttx/drivers/mmcsd/mmcsd_debug.c | 62 | ||||
-rw-r--r-- | nuttx/drivers/mmcsd/mmcsd_internal.h | 7 | ||||
-rw-r--r-- | nuttx/drivers/mmcsd/mmcsd_spi.c | 6 | ||||
-rw-r--r-- | nuttx/drivers/net/cs89x0.c | 2 | ||||
-rw-r--r-- | nuttx/drivers/usbdev/usbdev_scsi.c | 2 |
5 files changed, 9 insertions, 70 deletions
diff --git a/nuttx/drivers/mmcsd/mmcsd_debug.c b/nuttx/drivers/mmcsd/mmcsd_debug.c index 85e2d7d44..2b05f3df6 100644 --- a/nuttx/drivers/mmcsd/mmcsd_debug.c +++ b/nuttx/drivers/mmcsd/mmcsd_debug.c @@ -85,68 +85,6 @@ * Name: mmcsd_dmpcsd * * Description: - * Dump the contents a buffer - * - ****************************************************************************/ - -#ifdef CONFIG_MMCSD_DUMPALL -void mmcsd_dumpbuffer(FAR const ubyte *buffer, unsigned int buflen) -{ - int i, j, k; - - for (i = 0; i < buflen; i += 32) - { - message("%04x: ", i); - for (j = 0; j < 32; j++) - { - k = i + j; - - if (j == 16) - { - message(" "); - } - - if (k < buflen) - { - message("%02x", buffer[k]); - } - else - { - message(" "); - } - } - - message(" "); - for (j = 0; j < 32; j++) - { - k = i + j; - - if (j == 16) - { - message(" "); - } - - if (k < buflen) - { - if (buffer[k] >= 0x20 && buffer[k] < 0x7f) - { - message("%c", buffer[k]); - } - else - { - message("."); - } - } - } - message("\n"); - } -} -#endif - -/**************************************************************************** - * Name: mmcsd_dmpcsd - * - * Description: * Dump the contents of the CSD * ****************************************************************************/ diff --git a/nuttx/drivers/mmcsd/mmcsd_internal.h b/nuttx/drivers/mmcsd/mmcsd_internal.h index 1a81b59b5..9d25a372a 100644 --- a/nuttx/drivers/mmcsd/mmcsd_internal.h +++ b/nuttx/drivers/mmcsd/mmcsd_internal.h @@ -1,7 +1,7 @@ /**************************************************************************** * drivers/mmcsd/mmcsd_internal.h * - * Copyright (C) 20082009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -42,6 +42,7 @@ #include <nuttx/config.h> #include <sys/types.h> +#include <debug.h> /**************************************************************************** * Pre-Processor Definitions @@ -85,9 +86,9 @@ extern "C" { #endif #ifdef CONFIG_MMCSD_DUMPALL -EXTERN void mmcsd_dumpbuffer(FAR const ubyte *buffer, unsigned int buflen); +# define mmcsd_dumpbuffer(m,b,l) fvdbgdumpbuffer(m,b,l) #else -# define mmcsd_dumpbuffer(b,l) +# define mmcsd_dumpbuffer(m,b,l) #endif #if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) diff --git a/nuttx/drivers/mmcsd/mmcsd_spi.c b/nuttx/drivers/mmcsd/mmcsd_spi.c index cd0870616..412969922 100644 --- a/nuttx/drivers/mmcsd/mmcsd_spi.c +++ b/nuttx/drivers/mmcsd/mmcsd_spi.c @@ -347,7 +347,7 @@ static void mmcsd_semtake(sem_t *sem) * Name: mmcsd_waitready * * Description: - * Wait until the the card is no longer busy + * Wait until the card is no longer busy * * Assumptions: * MMC/SD card already selected @@ -1170,7 +1170,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer, mmcsd_semgive(&slot->sem); fvdbg("Read %d bytes:\n", nbytes); - mmcsd_dumpbuffer(buffer, nbytes); + mmcsd_dumpbuffer("Read buffer", buffer, nbytes); return nsectors; errout_with_eio: @@ -1264,7 +1264,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer, offset = start_sector * SECTORSIZE(slot); fvdbg("nbytes=%d byte offset=%d\n", nbytes, offset); } - mmcsd_dumpbuffer(buffer, nbytes); + mmcsd_dumpbuffer("Write buffer", buffer, nbytes); /* Select the slave */ diff --git a/nuttx/drivers/net/cs89x0.c b/nuttx/drivers/net/cs89x0.c index bfabe6e93..d7ceef233 100644 --- a/nuttx/drivers/net/cs89x0.c +++ b/nuttx/drivers/net/cs89x0.c @@ -823,7 +823,7 @@ static int cs89x0_txavail(struct uip_driver_s *dev) * Initialize the Ethernet driver * * Parameters: - * impl - decribes the the implementation of the cs89x00 implementation. + * impl - decribes the implementation of the cs89x00 implementation. * This reference is retained so so must remain stable throughout the * life of the driver instance. * devno - Identifies the device number. This must be a number between diff --git a/nuttx/drivers/usbdev/usbdev_scsi.c b/nuttx/drivers/usbdev/usbdev_scsi.c index e17999b20..700bb64fb 100644 --- a/nuttx/drivers/usbdev/usbdev_scsi.c +++ b/nuttx/drivers/usbdev/usbdev_scsi.c @@ -1900,7 +1900,7 @@ static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv) if (priv->cbwdir == USBSTRG_FLAGS_DIRDEVICE2HOST) { - /* The number of bytes in the response cannot exceed the the host + /* The number of bytes in the response cannot exceed the host * 'allocation length' in the command. */ |