For LPC17xx MCUs, rename up_spiinitialize to lpc17_spibus_initialize

This commit is contained in:
Gregory Nutt
2016-01-26 17:07:29 -06:00
parent 2f068e1a34
commit 8201752561
4 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -150,7 +150,7 @@ int board_app_initialize(void)
/* Get the SPI port */ /* Get the SPI port */
spi = lpc17_spiinitialize(CONFIG_NSH_MMCSDSPIPORTNO); spi = lpc17_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
if (!spi) if (!spi)
{ {
message("board_app_initialize: Failed to initialize SPI port %d\n", message("board_app_initialize: Failed to initialize SPI port %d\n",
+7 -7
View File
@@ -94,7 +94,7 @@
************************************************************************************/ ************************************************************************************/
/************************************************************************************ /************************************************************************************
* Name: zkit_spiinitialize * Name: zkit_spidev_initialize
* *
* Description: * Description:
* Called to configure SPI chip select and card detect GPIO pins for the * Called to configure SPI chip select and card detect GPIO pins for the
@@ -102,18 +102,18 @@
* *
************************************************************************************/ ************************************************************************************/
void weak_function zkit_spiinitialize(void) void weak_function zkit_spidev_initialize(void)
{ {
/* Configure the SPI-based microSD CS and Card Detect (CD) GPIO */ /* Configure the SPI-based microSD CS and Card Detect (CD) GPIO */
spi_dumpgpio("zkit_spiinitialize() Entry)"); spi_dumpgpio("zkit_spidev_initialize() Entry)");
/* Configure card detect and chip select for the SD slot. */ /* Configure card detect and chip select for the SD slot. */
(void)lpc17_configgpio(ZKITARM_SD_CS); (void)lpc17_configgpio(ZKITARM_SD_CS);
(void)lpc17_configgpio(ZKITARM_SD_CD); (void)lpc17_configgpio(ZKITARM_SD_CD);
spi_dumpgpio("zkit_spiinitialize() Exit"); spi_dumpgpio("zkit_spidev_initialize() Exit");
} }
/************************************************************************************ /************************************************************************************
@@ -123,7 +123,7 @@ void weak_function zkit_spiinitialize(void)
* The external functions, lpc17_spiselect and lpc17_spistatus * The external functions, lpc17_spiselect and lpc17_spistatus
* must be provided by board-specific logic. They are implementations of the select * must be provided by board-specific logic. They are implementations of the select
* and status methods of the SPI interface defined by struct spi_ops_s (see * and status methods of the SPI interface defined by struct spi_ops_s (see
* include/nuttx/spi/spi.h). All other methods (including up_spiinitialize()) * include/nuttx/spi/spi.h). All other methods (including lpc17_spibus_initialize())
* are provided by common LPC17xx logic. To use this common SPI logic on your * are provided by common LPC17xx logic. To use this common SPI logic on your
* board: * board:
* *
@@ -132,9 +132,9 @@ void weak_function zkit_spiinitialize(void)
* 2. Provide lpc17_spiselect and lpc17_spistatus functions * 2. Provide lpc17_spiselect and lpc17_spistatus functions
* in your board-specific logic. These functions will perform chip selection * in your board-specific logic. These functions will perform chip selection
* and status operations using GPIOs in the way your board is configured. * and status operations using GPIOs in the way your board is configured.
* 3. Add a calls to up_spiinitialize() in your low level application * 3. Add a calls to lpc17_spibus_initialize() in your low level application
* initialization logic * initialization logic
* 4. The handle returned by up_spiinitialize() may then be used to bind the * 4. The handle returned by lpc17_spibus_initialize() may then be used to bind the
* SPI driver to higher level logic (e.g., calling * SPI driver to higher level logic (e.g., calling
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to * mmcsd_spislotinitialize(), for example, will bind the SPI driver to
* the SPI MMC/SD driver). * the SPI MMC/SD driver).
+2 -2
View File
@@ -100,8 +100,8 @@ int usbmsc_archinitialize(void)
syslog(LOG_INFO, "Initializing SPI port %d\n", syslog(LOG_INFO, "Initializing SPI port %d\n",
LPC17XX_MMCSDSPIPORTNO); LPC17XX_MMCSDSPIPORTNO);
zkit_spiinitialize(); zkit_spidev_initialize();
spi = lpc17_spiinitialize(LPC17XX_MMCSDSPIPORTNO); spi = lpc17_spibus_initialize(LPC17XX_MMCSDSPIPORTNO);
if (!spi) if (!spi)
{ {
syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n", syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n",
+1 -1
View File
@@ -247,7 +247,7 @@ void weak_function zkit_sspinitialize(void);
* *
************************************************************************************/ ************************************************************************************/
void weak_function zkit_spiinitialize(void); void weak_function zkit_spidev_initialize(void);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* _CONFIGS_ZKITARM_LPC1768_SRC_ZKITARM_H */ #endif /* _CONFIGS_ZKITARM_LPC1768_SRC_ZKITARM_H */