mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
For PIC32MX MCUs, rename up_spiinitialize to pic32mx_spibus_initialize
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user