summaryrefslogtreecommitdiff
path: root/nuttx/configs/olimex-strp711/src/up_spi.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-03-29 18:02:35 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-03-29 18:02:35 +0000
commiteb8bf2893617f690ab073a5d1b697bd12e5220a0 (patch)
tree7e66acd74d0437a7f8aa6bcadf882f075391dd38 /nuttx/configs/olimex-strp711/src/up_spi.c
parentd2e5f38c3b7eefe042f36392660dbea013ee1705 (diff)
downloadpx4-nuttx-eb8bf2893617f690ab073a5d1b697bd12e5220a0.tar.gz
px4-nuttx-eb8bf2893617f690ab073a5d1b697bd12e5220a0.tar.bz2
px4-nuttx-eb8bf2893617f690ab073a5d1b697bd12e5220a0.zip
Add enum argument to SPI select method
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1666 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/olimex-strp711/src/up_spi.c')
-rw-r--r--nuttx/configs/olimex-strp711/src/up_spi.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/nuttx/configs/olimex-strp711/src/up_spi.c b/nuttx/configs/olimex-strp711/src/up_spi.c
index 43a166b2a..b30b426fd 100644
--- a/nuttx/configs/olimex-strp711/src/up_spi.c
+++ b/nuttx/configs/olimex-strp711/src/up_spi.c
@@ -265,7 +265,7 @@ static inline void spi_putreg(FAR struct str71x_spidev_s *priv, ubyte offset,
/* SPI methods */
-static void spi_select(FAR struct spi_dev_s *dev, boolean selected);
+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_sndbyte(FAR struct spi_dev_s *dev, ubyte ch);
@@ -357,17 +357,21 @@ static inline void spi_putreg(FAR struct str71x_spidev_s *priv, ubyte offset, ui
* Name: spi_select
*
* Description:
- * Enable/disable the SPI slave select
+ * Enable/disable the SPI slave select. The implementation of this method
+ * must include handshaking: If a device is selected, it must hold off
+ * all other attempts to select the device until the device is deselected.
*
* Input Parameters:
- * selected: TRUE: slave selected, FALSE: slave de-selected
+ * dev - Device-specific state data
+ * devid - Identifies the device to select
+ * selected - TRUE: slave selected, FALSE: slave de-selected
*
* Returned Value:
* None
*
****************************************************************************/
-static void spi_select(FAR struct spi_dev_s *dev, boolean selected)
+static void spi_select(FAR struct spi_dev_s *dev, enum spidev_e devid, boolean selected)
{
FAR struct str71x_spidev_s *priv = (FAR struct str71x_spidev_s *)dev;
uint16 reg16;