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

View File

@ -150,7 +150,7 @@ int board_app_initialize(void)
/* Get the SPI port */
spi = lpc17_spiinitialize(CONFIG_NSH_MMCSDSPIPORTNO);
spi = lpc17_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
if (!spi)
{
message("board_app_initialize: Failed to initialize SPI port %d\n",

View File

@ -94,7 +94,7 @@
************************************************************************************/
/************************************************************************************
* Name: zkit_spiinitialize
* Name: zkit_spidev_initialize
*
* Description:
* 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 */
spi_dumpgpio("zkit_spiinitialize() Entry)");
spi_dumpgpio("zkit_spidev_initialize() Entry)");
/* Configure card detect and chip select for the SD slot. */
(void)lpc17_configgpio(ZKITARM_SD_CS);
(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
* 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
* 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
* board:
*
@ -132,9 +132,9 @@ void weak_function zkit_spiinitialize(void)
* 2. Provide lpc17_spiselect and lpc17_spistatus functions
* in your board-specific logic. These functions will perform chip selection
* 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
* 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
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
* the SPI MMC/SD driver).

View File

@ -100,8 +100,8 @@ int usbmsc_archinitialize(void)
syslog(LOG_INFO, "Initializing SPI port %d\n",
LPC17XX_MMCSDSPIPORTNO);
zkit_spiinitialize();
spi = lpc17_spiinitialize(LPC17XX_MMCSDSPIPORTNO);
zkit_spidev_initialize();
spi = lpc17_spibus_initialize(LPC17XX_MMCSDSPIPORTNO);
if (!spi)
{
syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n",

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 /* _CONFIGS_ZKITARM_LPC1768_SRC_ZKITARM_H */