summaryrefslogtreecommitdiff
path: root/nuttx/arch/mips
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-06-03 16:09:59 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-06-03 16:09:59 +0000
commit62eace05ebbb6a96ee4ad34e996e56870c53d892 (patch)
tree8e9bf6afcf899141ace314a09e22a67fda94e3a3 /nuttx/arch/mips
parent95d721394520c24155155dc548d1a49bb89dd7b6 (diff)
downloadpx4-nuttx-62eace05ebbb6a96ee4ad34e996e56870c53d892.tar.gz
px4-nuttx-62eace05ebbb6a96ee4ad34e996e56870c53d892.tar.bz2
px4-nuttx-62eace05ebbb6a96ee4ad34e996e56870c53d892.zip
SD card now works on the PIC32MX7 MMB board
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4799 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/mips')
-rw-r--r--nuttx/arch/mips/src/pic32mx/pic32mx-spi.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-spi.c b/nuttx/arch/mips/src/pic32mx/pic32mx-spi.c
index ee7cea9eb..7bc1eee3e 100644
--- a/nuttx/arch/mips/src/pic32mx/pic32mx-spi.c
+++ b/nuttx/arch/mips/src/pic32mx/pic32mx-spi.c
@@ -64,7 +64,7 @@
* Definitions
****************************************************************************/
/* Enables non-standard debug output from this file.
- *
+ *
* CONFIG_SPI_DEBUG && CONFIG_DEBUG - Define to enable basic SPI debug
* CONFIG_DEBUG_VERBOSE - Define to enable verbose SPI debug
*/
@@ -527,7 +527,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
}
/* Save the new BRG value */
-
+
spi_putreg(priv, PIC32MX_SPI_BRG_OFFSET, regval);
spivdbg("PBCLOCK: %d frequency: %d divisor: %d BRG: %d\n",
BOARD_PBCLOCK, frequency, divisor, regval);
@@ -619,19 +619,19 @@ static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode)
{
case SPIDEV_MODE0: /* CPOL=0; CPHA=0 */
break;
-
+
case SPIDEV_MODE1: /* CPOL=0; CPHA=1 */
regval |= SPI_CON_CKE;
break;
-
+
case SPIDEV_MODE2: /* CPOL=1; CPHA=0 */
regval |= SPI_CON_CKP;
break;
-
+
case SPIDEV_MODE3: /* CPOL=1; CPHA=1 */
regval |= (SPI_CON_CKP|SPI_CON_CKE);
break;
-
+
default:
DEBUGASSERT(FALSE);
return;
@@ -866,7 +866,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw
while ((spi_getreg(priv, PIC32MX_SPI_STAT_OFFSET) & SPI_STAT_SPIRBF) == 0);
#endif
- /* Read the received data from the SPI Data Register */
+ /* Read the received data from the SPI Data Register */
*ptr++ = (uint8_t)spi_getreg(priv, PIC32MX_SPI_BUF_OFFSET);
nwords--;
@@ -950,7 +950,7 @@ FAR struct spi_dev_s *up_spiinitialize(int port)
/* Clear the receive buffer by reading from the BUF register */
regval = spi_getreg(priv, PIC32MX_SPI_BUF_OFFSET);
-
+
#ifdef CONFIG_PIC32MX_SPI_INTERRUPTS
/* Attach the interrupt vector. We do this early to make sure that the
* resource is available.