diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-04-07 15:28:04 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-04-07 15:28:04 -0600 |
commit | a9202744ff86f89a2ed0b6cea07de5c0fff402a1 (patch) | |
tree | c0dd61fc6ad47e6e3f07b5f86c276c27f221bd45 | |
parent | 0e1d33d879f2d6246a0be0217f1279094fbc22f7 (diff) | |
download | nuttx-a9202744ff86f89a2ed0b6cea07de5c0fff402a1.tar.gz nuttx-a9202744ff86f89a2ed0b6cea07de5c0fff402a1.tar.bz2 nuttx-a9202744ff86f89a2ed0b6cea07de5c0fff402a1.zip |
Cosmetic changes to comments and README
-rw-r--r-- | nuttx/arch/arm/src/tiva/tiva_dumpgpio.c | 4 | ||||
-rw-r--r-- | nuttx/arch/arm/src/tiva/tiva_ssi.c | 7 | ||||
-rw-r--r-- | nuttx/configs/lm4f120-launchpad/README.txt | 34 | ||||
-rw-r--r-- | nuttx/configs/lm4f120-launchpad/include/board.h | 2 | ||||
-rw-r--r-- | nuttx/drivers/mmcsd/mmcsd_spi.c | 32 |
5 files changed, 47 insertions, 32 deletions
diff --git a/nuttx/arch/arm/src/tiva/tiva_dumpgpio.c b/nuttx/arch/arm/src/tiva/tiva_dumpgpio.c index d6c562e1e..0a326afec 100644 --- a/nuttx/arch/arm/src/tiva/tiva_dumpgpio.c +++ b/nuttx/arch/arm/src/tiva/tiva_dumpgpio.c @@ -204,6 +204,7 @@ static inline uint8_t tiva_gpioport(int port) int tiva_dumpgpio(uint32_t pinset, const char *msg) { +#ifdef CONFIG_DEBUG irqstate_t flags; unsigned int port = (pinset & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT; uintptr_t base; @@ -242,6 +243,9 @@ int tiva_dumpgpio(uint32_t pinset, const char *msg) getreg32(base + TIVA_GPIO_PUR_OFFSET), getreg32(base + TIVA_GPIO_PDR_OFFSET), getreg32(base + TIVA_GPIO_SLR_OFFSET)); } + irqrestore(flags); +#endif /* CONFIG_DEBUG */ + return OK; } diff --git a/nuttx/arch/arm/src/tiva/tiva_ssi.c b/nuttx/arch/arm/src/tiva/tiva_ssi.c index 4c62b13e5..d77a2edd6 100644 --- a/nuttx/arch/arm/src/tiva/tiva_ssi.c +++ b/nuttx/arch/arm/src/tiva/tiva_ssi.c @@ -834,6 +834,7 @@ static int ssi_transfer(struct tiva_ssidev_s *priv, const void *txbuffer, ssi_getreg(priv, TIVA_SSI_SR_OFFSET)); ntxd = ssi_performtx(priv); + UNUSED(ntxd); /* For the case where nwords < Tx FIFO size, ssi_performrx will * configure interrupts correctly for the final phase of the @@ -873,6 +874,7 @@ static int ssi_transfer(struct tiva_ssidev_s *priv, const void *txbuffer, /* Handle outgoing Tx FIFO transfers */ ntxd = ssi_performtx(priv); + UNUSED(ntxd); /* Handle incoming Rx FIFO transfers */ @@ -886,6 +888,7 @@ static int ssi_transfer(struct tiva_ssidev_s *priv, const void *txbuffer, } while (priv->nrxwords < priv->nwords); #endif + return OK; } @@ -996,6 +999,7 @@ static int ssi_interrupt(int irq, void *context) ssidbg("Transfer complete\n"); ssi_semgive(&priv->xfrsem); } + return OK; } #endif @@ -1043,6 +1047,7 @@ static int ssi_lock(FAR struct spi_dev_s *dev, bool lock) { (void)sem_post(&priv->exclsem); } + return OK; } #endif @@ -1160,8 +1165,10 @@ static uint32_t ssi_setfrequencyinternal(struct tiva_ssidev_s *priv, priv->frequency = frequency; priv->actual = actual; } + return priv->actual; #else + return actual; #endif } diff --git a/nuttx/configs/lm4f120-launchpad/README.txt b/nuttx/configs/lm4f120-launchpad/README.txt index 17dd30851..bca8a11f8 100644 --- a/nuttx/configs/lm4f120-launchpad/README.txt +++ b/nuttx/configs/lm4f120-launchpad/README.txt @@ -473,43 +473,43 @@ Serial Console By default, all configurations use UART0 which connects to the USB VCOM on the DEBUG port on the LM4F120 LaunchPad: - UART0 RX - PA.0 - UART0 TX - PA.1 + UART0 RX - PA.0 + UART0 TX - PA.1 However, if you use an external RS232 driver, then other options are available. UART1 has option pin settings and flow control capabilities that are not available with the other UARTS:: - UART1 RX - PB.0 or PC.4 (Need disambiguation in board.h) - UART1 TX - PB.1 or PC.5 (" " " " "" " ") + UART1 RX - PB.0 or PC.4 (Need disambiguation in board.h) + UART1 TX - PB.1 or PC.5 (" " " " "" " ") UART1_RTS - PF.0 or PC.4 UART1_CTS - PF.1 or PC.5 NOTE: board.h currently selects PB.0, PB.1, PF.0 and PF.1 for UART1, but - that can be changed by editting board.h + that can be changed by editing board.h UART2-5, 7 are also available, UART2 is not recommended because it shares some pin usage with USB device mode. UART6 is not available because its only RX/TX pin options are dedicated to USB support. - UART2 RX - PD.6 - UART2 TX - PD.7 (Also used for USB VBUS detection) + UART2 RX - PD.6 + UART2 TX - PD.7 (Also used for USB VBUS detection) - UART3 RX - PC.6 - UART3 TX - PC.7 + UART3 RX - PC.6 + UART3 TX - PC.7 - UART4 RX - PC.4 - UART4 TX - PC.5 + UART4 RX - PC.4 + UART4 TX - PC.5 - UART5 RX - PE.4 - UART5 TX - PE.5 + UART5 RX - PE.4 + UART5 TX - PE.5 - UART6 RX - PD.4, Not available. Dedicated for USB_DM - UART6 TX - PD.5, Not available. Dedicated for USB_DP + UART6 RX - PD.4, Not available. Dedicated for USB_DM + UART6 TX - PD.5, Not available. Dedicated for USB_DP - UART7 RX - PE.0 - UART7 TX - PE.1 + UART7 RX - PE.0 + UART7 TX - PE.1 USB Device Controller Functions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/nuttx/configs/lm4f120-launchpad/include/board.h b/nuttx/configs/lm4f120-launchpad/include/board.h index d9008bb08..4a191c408 100644 --- a/nuttx/configs/lm4f120-launchpad/include/board.h +++ b/nuttx/configs/lm4f120-launchpad/include/board.h @@ -77,7 +77,7 @@ */ #define TIVA_RCC_VALUE (SYSCON_RCC_OSCSRC | SYSCON_RCC_XTAL | \ - SYSCON_RCC_USESYSDIV | SYSCON_RCC_SYSDIV(TIVA_SYSDIV)) + SYSCON_RCC_USESYSDIV | SYSCON_RCC_SYSDIV(TIVA_SYSDIV)) /* RCC2 settings * diff --git a/nuttx/drivers/mmcsd/mmcsd_spi.c b/nuttx/drivers/mmcsd/mmcsd_spi.c index ee9935f7e..1512ef085 100644 --- a/nuttx/drivers/mmcsd/mmcsd_spi.c +++ b/nuttx/drivers/mmcsd/mmcsd_spi.c @@ -146,20 +146,20 @@ struct mmcsd_slot_s { FAR struct spi_dev_s *spi; /* SPI port bound to this slot */ - sem_t sem; /* Assures mutually exclusive accesss to card and SPI */ - uint8_t state; /* State of the slot (see MMCSD_SLOTSTATUS_* definitions) */ - uint8_t type; /* Disk type */ - uint8_t csd[16]; /* Copy of card CSD */ + sem_t sem; /* Assures mutually exclusive accesss to card and SPI */ + uint8_t state; /* State of the slot (see MMCSD_SLOTSTATUS_* definitions) */ + uint8_t type; /* Disk type */ + uint8_t csd[16]; /* Copy of card CSD */ #ifndef CONFIG_MMCSD_SECTOR512 - uint16_t sectorsize; /* Media block size (in bytes) */ + uint16_t sectorsize; /* Media block size (in bytes) */ #endif - uint32_t nsectors; /* Number of blocks on the media */ - uint32_t taccess; /* Card access time */ - uint32_t twrite; /* Card write time */ - uint32_t ocr; /* Last 4 bytes of OCR (R3) */ - uint32_t r7; /* Last 4 bytes of R7 */ + uint32_t nsectors; /* Number of blocks on the media */ + uint32_t taccess; /* Card access time */ + uint32_t twrite; /* Card write time */ + uint32_t ocr; /* Last 4 bytes of OCR (R3) */ + uint32_t r7; /* Last 4 bytes of R7 */ #ifndef CONFIG_SPI_OWNBUS - uint32_t spispeed; /* Speed to use for SPI in data mode */ + uint32_t spispeed; /* Speed to use for SPI in data mode */ #endif }; @@ -1035,6 +1035,7 @@ static int mmcsd_xmitblock(FAR struct mmcsd_slot_s *slot, const uint8_t *buffer, fdbg("Bad data response: %02x\n", response); return -EIO; } + return OK; } #endif /* CONFIG_FS_WRITABLE && !CONFIG_MMCSD_READONLY */ @@ -1089,7 +1090,7 @@ static int mmcsd_open(FAR struct inode *inode) if (slot->type == MMCSD_CARDTYPE_UNKNOWN) { - /* Ininitialize for the media in the slot */ + /* Initialize for the media in the slot */ ret = mmcsd_mediainitialize(slot); if (ret < 0) @@ -1188,6 +1189,8 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer, /* Convert sector and nsectors to nbytes and byte offset */ nbytes = nsectors * SECTORSIZE(slot); + UNUSED(nbytes); + if (IS_BLOCK(slot->type)) { offset = start_sector; @@ -1402,7 +1405,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer, } /* Send CMD25: Continuously write blocks of data until the - * tranmission is stopped. + * transmission is stopped. */ response = mmcsd_sendcmd(slot, &g_cmd25, offset); @@ -1850,6 +1853,7 @@ static void mmcsd_mediachanged(void *arg) return; } #endif + spi = slot->spi; /* Save the current slot state and reassess the new state */ @@ -1957,7 +1961,7 @@ int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi) mmcsd_semtake(slot); mmcsd_spiinit(slot); - /* Ininitialize for the media in the slot (if any) */ + /* Initialize for the media in the slot (if any) */ ret = mmcsd_mediainitialize(slot); mmcsd_semgive(slot); |