summaryrefslogtreecommitdiff
path: root/nuttx/configs/mcu123-lpc214x/src
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-03-29 18:53:20 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-03-29 18:53:20 +0000
commit0770d2dd012902a4500bfac21e90181e3ed5ad69 (patch)
treedd3432ad3b7c5fcc83c955ba2539ab4a387f1621 /nuttx/configs/mcu123-lpc214x/src
parenteb8bf2893617f690ab073a5d1b697bd12e5220a0 (diff)
downloadpx4-nuttx-0770d2dd012902a4500bfac21e90181e3ed5ad69.tar.gz
px4-nuttx-0770d2dd012902a4500bfac21e90181e3ed5ad69.tar.bz2
px4-nuttx-0770d2dd012902a4500bfac21e90181e3ed5ad69.zip
Add enum argument to SPI status method
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1667 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/mcu123-lpc214x/src')
-rw-r--r--nuttx/configs/mcu123-lpc214x/src/up_spi.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/nuttx/configs/mcu123-lpc214x/src/up_spi.c b/nuttx/configs/mcu123-lpc214x/src/up_spi.c
index f517939c4..210f3d736 100644
--- a/nuttx/configs/mcu123-lpc214x/src/up_spi.c
+++ b/nuttx/configs/mcu123-lpc214x/src/up_spi.c
@@ -4,8 +4,6 @@
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
- * This logic emulates the Prolific PL2303 serial/USB converter
- *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -90,7 +88,7 @@
static void spi_select(FAR struct spi_dev_s *dev, enum spidev_e devid, boolean selected);
static uint32 spi_setfrequency(FAR struct spi_dev_s *dev, uint32 frequency);
-static ubyte spi_status(FAR struct spi_dev_s *dev);
+static ubyte spi_status(FAR struct spi_dev_s *dev, enum spidev_e devid);
static ubyte spi_sndbyte(FAR struct spi_dev_s *dev, ubyte ch);
static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const ubyte *buffer, size_t buflen);
static void spi_recvblock(FAR struct spi_dev_s *dev, FAR ubyte *buffer, size_t buflen);
@@ -183,7 +181,8 @@ static void spi_select(FAR struct spi_dev_s *dev, enum spidev_e devid, boolean s
* Set the SPI frequency.
*
* Input Parameters:
- * frequency: The SPI frequency requested
+ * dev - Device-specific state data
+ * frequency - The SPI frequency requested
*
* Returned Value:
* Returns the actual frequency selected
@@ -215,14 +214,15 @@ static uint32 spi_setfrequency(FAR struct spi_dev_s *dev, uint32 frequency)
* Get SPI/MMC status
*
* Input Parameters:
- * None
+ * dev - Device-specific state data
+ * devid - Identifies the device to report status on
*
* Returned Value:
* Returns a bitset of status values (see SPI_STATUS_* defines
*
****************************************************************************/
-static ubyte spi_status(FAR struct spi_dev_s *dev)
+static ubyte spi_status(FAR struct spi_dev_s *dev, enum spidev_e devid)
{
/* I don't think there is anyway to determine these things on the mcu123.com
* board.
@@ -238,7 +238,8 @@ static ubyte spi_status(FAR struct spi_dev_s *dev)
* Send one byte on SPI
*
* Input Parameters:
- * ch - the byte to send
+ * dev - Device-specific state data
+ * ch - The byte to send
*
* Returned Value:
* response
@@ -271,6 +272,7 @@ static ubyte spi_sndbyte(FAR struct spi_dev_s *dev, ubyte ch)
* Send a block of data on SPI
*
* Input Parameters:
+ * dev - Device-specific state data
* buffer - A pointer to the buffer of data to be sent
* buflen - the length of data to send from the buffer
*
@@ -335,6 +337,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const ubyte *buffer, siz
* Revice a block of data from SPI
*
* Input Parameters:
+ * dev - Device-specific state data
* buffer - A pointer to the buffer in which to recieve data
* buflen - the length of data that can be received in the buffer
*