diff options
Diffstat (limited to 'nuttx/arch')
-rw-r--r-- | nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.h | 2 | ||||
-rw-r--r-- | nuttx/arch/arm/src/lpc17xx/lpc17_spi.c | 8 | ||||
-rw-r--r-- | nuttx/arch/arm/src/lpc17xx/lpc17_spi.h | 22 | ||||
-rw-r--r-- | nuttx/arch/arm/src/lpc17xx/lpc17_ssp.c | 6 | ||||
-rw-r--r-- | nuttx/arch/arm/src/lpc17xx/lpc17_ssp.h | 22 |
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). * |