summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/lpc17xx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-04-01 15:02:22 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-04-01 15:02:22 +0000
commit8a4cd2258a5f535f54abf86d6eb92aa000ac085b (patch)
treede4e1fda591ec8134323065fa52ab6827ebc3dda /nuttx/arch/arm/src/lpc17xx
parent9bd404cc67fe1ad52599e3a89036344d78cbdf55 (diff)
downloadpx4-nuttx-8a4cd2258a5f535f54abf86d6eb92aa000ac085b.tar.gz
px4-nuttx-8a4cd2258a5f535f54abf86d6eb92aa000ac085b.tar.bz2
px4-nuttx-8a4cd2258a5f535f54abf86d6eb92aa000ac085b.zip
LPC17xx SPI and SSP initialization functions both called up_spiinitialize(); Changed to lpc17_spinitialize() and lpc17_sspinitialize().
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5809 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lpc17xx')
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.h2
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_spi.c8
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_spi.h22
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_ssp.c6
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_ssp.h22
5 files changed, 46 insertions, 14 deletions
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.h b/nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.h
index cd2d10dd2..43bdb27ea 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.h
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.h
@@ -56,7 +56,7 @@
typedef FAR void *DMA_HANDLE;
-/* dma_callback_t a function pointer provided to lp17_dmastart. This function is
+/* dma_callback_t a function pointer provided to lpc17_dmastart. This function is
* called at the completion of the DMA transfer. 'arg' is the same 'arg' value
* that was provided when lpc17_dmastart() was called and result indicates the result
* of the transfer: Zero indicates a successful tranfers. On failure, a negated
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_spi.c b/nuttx/arch/arm/src/lpc17xx/lpc17_spi.c
index d87e6c1ec..75a483591 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_spi.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_spi.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/lpc17xx/lpc17_spi.c
*
- * Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2010, 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -539,10 +539,10 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw
****************************************************************************/
/****************************************************************************
- * Name: up_spiinitialize
+ * Name: lpc17_spiinitialize
*
* Description:
- * Initialize the selected SPI port
+ * Initialize the selected SPI port.
*
* Input Parameter:
* Port number (for hardware that has mutiple SPI interfaces)
@@ -552,7 +552,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw
*
****************************************************************************/
-FAR struct spi_dev_s *up_spiinitialize(int port)
+FAR struct spi_dev_s *lpc17_spiinitialize(int port)
{
FAR struct lpc17_spidev_s *priv = &g_spidev;
irqstate_t flags;
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_spi.h b/nuttx/arch/arm/src/lpc17xx/lpc17_spi.h
index e6898aac7..3d4620b52 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_spi.h
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_spi.h
@@ -71,13 +71,29 @@ extern "C"
************************************************************************************/
/************************************************************************************
+ * Name: lpc17_spiinitialize
+ *
+ * Description:
+ * Initialize the selected SPI port.
+ *
+ * Input Parameter:
+ * Port number (for hardware that has mutiple SPI interfaces)
+ *
+ * Returned Value:
+ * Valid SPI device structure reference on succcess; a NULL on failure
+ *
+ ************************************************************************************/
+
+FAR struct spi_dev_s *lpc17_spiinitialize(int port);
+
+/************************************************************************************
* Name: lpc17_spiselect, lpc17_status, and lpc17_spicmddata
*
* Description:
* These external functions must be provided by board-specific logic. They are
* implementations of the select, status, and cmddata methods of the SPI interface
* defined by struct spi_ops_s (see include/nuttx/spi.h). All other methods
- * including up_spiinitialize()) are provided by common LPC17xx logic. To use
+ * including lpc17_spiinitialize()) are provided by common LPC17xx logic. To use
* this common SPI logic on your board:
*
* 1. Provide logic in lpc17_boardinitialize() to configure SPI chip select pins.
@@ -88,9 +104,9 @@ extern "C"
* lpc17_spicmddata() functions in your board-specific logic. This function
* will perform cmd/data selection operations using GPIOs in the way your
* board is configured.
- * 3. Add a call to up_spiinitialize() in your low level application
+ * 3. Add a call to lpc17_spiinitialize() in your low level application
* initialization logic
- * 4. The handle returned by up_spiinitialize() may then be used to bind the
+ * 4. The handle returned by lpc17_spiinitialize() may then be used to bind the
* SPI driver to higher level logic (e.g., calling mmcsd_spislotinitialize(),
* for example, will bind the SPI driver to the SPI MMC/SD driver).
*
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_ssp.c b/nuttx/arch/arm/src/lpc17xx/lpc17_ssp.c
index 331319cc7..81b182e6c 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_ssp.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_ssp.c
@@ -814,10 +814,10 @@ static inline FAR struct lpc17_sspdev_s *lpc17_ssp1initialize(void)
****************************************************************************/
/****************************************************************************
- * Name: up_spiinitialize
+ * Name: lpc17_sspinitialize
*
* Description:
- * Initialize the selected SPI port
+ * Initialize the selected SSP port.
*
* Input Parameter:
* Port number (for hardware that has mutiple SPI interfaces)
@@ -827,7 +827,7 @@ static inline FAR struct lpc17_sspdev_s *lpc17_ssp1initialize(void)
*
****************************************************************************/
-FAR struct spi_dev_s *up_spiinitialize(int port)
+FAR struct spi_dev_s *lpc17_sspinitialize(int port)
{
FAR struct lpc17_sspdev_s *priv;
uint32_t regval;
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_ssp.h b/nuttx/arch/arm/src/lpc17xx/lpc17_ssp.h
index edc6846ba..add469661 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_ssp.h
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_ssp.h
@@ -71,13 +71,29 @@ extern "C"
************************************************************************************/
/************************************************************************************
+ * Name: lpc17_sspinitialize
+ *
+ * Description:
+ * Initialize the selected SSP port.
+ *
+ * Input Parameter:
+ * Port number (for hardware that has mutiple SPI interfaces)
+ *
+ * Returned Value:
+ * Valid SPI device structure reference on succcess; a NULL on failure
+ *
+ ************************************************************************************/
+
+FAR struct spi_dev_s *lpc17_sspinitialize(int port);
+
+/************************************************************************************
* Name: lpc17_ssp0/ssp1select, lpc17_ssp0/ssp1status, and lpc17_ssp0/ssp1cmddata
*
* Description:
* These external functions must be provided by board-specific logic. They are
* implementations of the select, status, and cmddata methods of the SPI interface
* defined by struct spi_ops_s (see include/nuttx/spi.h). All other methods
- * including up_spiinitialize()) are provided by common LPC17xx logic. To use
+ * including lpc17_sspinitialize()) are provided by common LPC17xx logic. To use
* this common SPI logic on your board:
*
* 1. Provide logic in lpc17_boardinitialize() to configure SSP chip select pins.
@@ -88,9 +104,9 @@ extern "C"
* lpc17_ssp0/ssp1cmddata() functions in your board-specific logic. These
* functions will perform cmd/data selection operations using GPIOs in the way
* your board is configured.
- * 3. Add a call to up_spiinitialize() in your low level application
+ * 3. Add a call to lpc17_sspinitialize() in your low level application
* initialization logic
- * 4. The handle returned by up_spiinitialize() may then be used to bind the
+ * 4. The handle returned by lpc17_sspinitialize() may then be used to bind the
* SSP driver to higher level logic (e.g., calling mmcsd_spislotinitialize(),
* for example, will bind the SSP driver to the SPI MMC/SD driver).
*