For PIC32MX MCUs, rename up_spiinitialize to pic32mx_spibus_initialize

This commit is contained in:
Gregory Nutt
2016-01-26 15:47:23 -06:00
parent 5a650d94a0
commit 28bc4e133e
12 changed files with 30 additions and 30 deletions
+1 -1
View File
@@ -589,7 +589,7 @@ Analog Input
/* Get the SPI port */
spi = up_spiinitialize(2);
spi = pic32mx_spibus_initialize(2);
if (!spi)
{
dbg("ERROR: Failed to initialize SPI port 2\n");
+1 -1
View File
@@ -107,7 +107,7 @@ int board_app_initialize(void)
/* Get the SPI port */
spi = up_spiinitialize(2);
spi = pic32mx_spibus_initialize(2);
if (!spi)
{
fdbg("ERROR: Failed to initialize SPI port 2\n");
+3 -3
View File
@@ -149,7 +149,7 @@ void weak_function pic32mx_spi2initialize(void)
* 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/spi.h). All other methods
* including up_spiinitialize()) are provided by common PIC32MX logic. To use
* including pic32mx_spibus_initialize()) are provided by common PIC32MX logic. To use
* this common SPI logic on your board:
*
* 1. Provide logic in pic32mx_boardinitialize() to configure SPI chip select
@@ -161,9 +161,9 @@ void weak_function pic32mx_spi2initialize(void)
* pic32mx_spiNcmddata() 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 pic32mx_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 pic32mx_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).
@@ -74,14 +74,14 @@
void pic32mx_boardinitialize(void)
{
/* Configure SPI chip selects if 1) at least one SPI is enabled, and 2) the weak
* function pic32mx_spiinitialize() has been brought into the link.
* function pic32mx_spidev_initialize() has been brought into the link.
*/
#if defined(CONFIG_PIC32MX_SPI1) || defined(CONFIG_PIC32MX_SPI2) || \
defined(CONFIG_PIC32MX_SPI3) || defined(CONFIG_PIC32MX_SPI4)
if (pic32mx_spiinitialize)
if (pic32mx_spidev_initialize)
{
pic32mx_spiinitialize();
pic32mx_spidev_initialize();
}
#endif
+1 -1
View File
@@ -220,7 +220,7 @@ static int nsh_sdinitialize(void)
/* Get the SPI port */
ssp = up_spiinitialize(CONFIG_NSH_MMCSDSPIPORTNO);
ssp = pic32mx_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
if (!ssp)
{
syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n",
+3 -3
View File
@@ -107,7 +107,7 @@ void weak_function pic32mx_sspinitialize(void)
* 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/spi.h). All other methods
* including up_spiinitialize()) are provided by common PIC32MX logic. To use
* including pic32mx_spibus_initialize()) are provided by common PIC32MX logic. To use
* this common SPI logic on your board:
*
* 1. Provide logic in pic32mx_boardinitialize() to configure SPI/SSP chip select
@@ -119,9 +119,9 @@ void weak_function pic32mx_sspinitialize(void)
* pic32mx_spiNcmddata() 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 pic32mx_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 pic32mx_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).
+3 -3
View File
@@ -74,14 +74,14 @@
void pic32mx_boardinitialize(void)
{
/* Configure SPI chip selects if 1) at least one SPI is enabled, and 2) the weak
* function pic32mx_spiinitialize() has been brought into the link.
* function pic32mx_spidev_initialize() has been brought into the link.
*/
#if defined(CONFIG_PIC32MX_SPI1) || defined(CONFIG_PIC32MX_SPI2) || \
defined(CONFIG_PIC32MX_SPI3) || defined(CONFIG_PIC32MX_SPI4)
if (pic32mx_spiinitialize)
if (pic32mx_spidev_initialize)
{
pic32mx_spiinitialize();
pic32mx_spidev_initialize();
}
#endif
+1 -1
View File
@@ -219,7 +219,7 @@ static int nsh_sdinitialize(void)
/* Get the SPI port */
spi = up_spiinitialize(CONFIG_NSH_MMCSDSPIPORTNO);
spi = pic32mx_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
if (!spi)
{
syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n",
+5 -5
View File
@@ -97,7 +97,7 @@
************************************************************************************/
/************************************************************************************
* Name: pic32mx_spiinitialize
* Name: pic32mx_spidev_initialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the Mikroelektronka PIC32MX7
@@ -105,7 +105,7 @@
*
************************************************************************************/
void weak_function pic32mx_spiinitialize(void)
void weak_function pic32mx_spidev_initialize(void)
{
/* Configure the SPI chip select, write protect, and card detect GPIOs */
@@ -123,7 +123,7 @@ void weak_function pic32mx_spiinitialize(void)
* 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/spi.h). All other methods
* including up_spiinitialize()) are provided by common PIC32MX logic. To use
* including pic32mx_spibus_initialize()) are provided by common PIC32MX logic. To use
* this common SPI logic on your board:
*
* 1. Provide logic in pic32mx_boardinitialize() to configure SPI chip select
@@ -135,9 +135,9 @@ void weak_function pic32mx_spiinitialize(void)
* pic32mx_spiNcmddata() 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 pic32mx_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 pic32mx_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).
+3 -3
View File
@@ -74,13 +74,13 @@
void pic32mx_boardinitialize(void)
{
/* Configure SPI chip selects if 1) at least one SPI is enabled, and 2) the weak
* function pic32mx_spiinitialize() has been brought into the link.
* function pic32mx_spidev_initialize() has been brought into the link.
*/
#if defined(CONFIG_PIC32MX_SPI2)
if (pic32mx_spiinitialize)
if (pic32mx_spidev_initialize)
{
pic32mx_spiinitialize();
pic32mx_spidev_initialize();
}
#endif
+1 -1
View File
@@ -212,7 +212,7 @@ static int nsh_sdinitialize(void)
/* Get the SPI port */
spi = up_spiinitialize(CONFIG_NSH_MMCSDSPIPORTNO);
spi = pic32mx_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
if (!spi)
{
syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n",
+5 -5
View File
@@ -150,14 +150,14 @@
************************************************************************************/
/************************************************************************************
* Name: pic32mx_spiinitialize
* Name: pic32mx_spidev_initialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the Sure PIC32MX board.
*
************************************************************************************/
void weak_function pic32mx_spiinitialize(void)
void weak_function pic32mx_spidev_initialize(void)
{
/* Configure the SPI2 chip select (CS) GPIO output, and the card detect (CD) and
* write protect (WP) inputs.
@@ -182,7 +182,7 @@ void weak_function pic32mx_spiinitialize(void)
* The external functions, pic32mx_spi2select and pic32mx_spi2status
* 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 pic32mx_spibus_initialize())
* are provided by common PIC32MX logic. To use this common SPI logic on your
* board:
*
@@ -191,9 +191,9 @@ void weak_function pic32mx_spiinitialize(void)
* 2. Provide pic32mx_spi2select() and pic32mx_spi2status() 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 pic32mx_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 pic32mx_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).