diff options
Diffstat (limited to 'nuttx/arch/arm/src/lpc17xx/lpc17_spi.h')
-rw-r--r-- | nuttx/arch/arm/src/lpc17xx/lpc17_spi.h | 22 |
1 files changed, 19 insertions, 3 deletions
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). * |