diff --git a/configs/mirtoo/README.txt b/configs/mirtoo/README.txt index a032c9140a7..799d77ccd0d 100644 --- a/configs/mirtoo/README.txt +++ b/configs/mirtoo/README.txt @@ -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"); diff --git a/configs/mirtoo/src/pic32_nsh.c b/configs/mirtoo/src/pic32_nsh.c index 411da9efc67..c2bd1dc9ffa 100644 --- a/configs/mirtoo/src/pic32_nsh.c +++ b/configs/mirtoo/src/pic32_nsh.c @@ -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"); diff --git a/configs/mirtoo/src/pic32_spi2.c b/configs/mirtoo/src/pic32_spi2.c index 823861b74d4..682ebfc88ef 100644 --- a/configs/mirtoo/src/pic32_spi2.c +++ b/configs/mirtoo/src/pic32_spi2.c @@ -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). diff --git a/configs/pic32mx-starterkit/src/pic32mx_boot.c b/configs/pic32mx-starterkit/src/pic32mx_boot.c index 6dcb87fc989..4c537a1f2e8 100644 --- a/configs/pic32mx-starterkit/src/pic32mx_boot.c +++ b/configs/pic32mx-starterkit/src/pic32mx_boot.c @@ -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 diff --git a/configs/pic32mx-starterkit/src/pic32mx_nsh.c b/configs/pic32mx-starterkit/src/pic32mx_nsh.c index f51e4056aa5..ab664808afa 100644 --- a/configs/pic32mx-starterkit/src/pic32mx_nsh.c +++ b/configs/pic32mx-starterkit/src/pic32mx_nsh.c @@ -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", diff --git a/configs/pic32mx-starterkit/src/pic32mx_spi.c b/configs/pic32mx-starterkit/src/pic32mx_spi.c index 1c4622db973..af5162b5862 100644 --- a/configs/pic32mx-starterkit/src/pic32mx_spi.c +++ b/configs/pic32mx-starterkit/src/pic32mx_spi.c @@ -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). diff --git a/configs/pic32mx7mmb/src/pic32_boot.c b/configs/pic32mx7mmb/src/pic32_boot.c index c6316ee4eea..cda70ea95a7 100644 --- a/configs/pic32mx7mmb/src/pic32_boot.c +++ b/configs/pic32mx7mmb/src/pic32_boot.c @@ -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 diff --git a/configs/pic32mx7mmb/src/pic32_nsh.c b/configs/pic32mx7mmb/src/pic32_nsh.c index 389e9e49961..bd3010bb35d 100644 --- a/configs/pic32mx7mmb/src/pic32_nsh.c +++ b/configs/pic32mx7mmb/src/pic32_nsh.c @@ -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", diff --git a/configs/pic32mx7mmb/src/pic32_spi.c b/configs/pic32mx7mmb/src/pic32_spi.c index edd136f1a1a..f89b06d93b0 100644 --- a/configs/pic32mx7mmb/src/pic32_spi.c +++ b/configs/pic32mx7mmb/src/pic32_spi.c @@ -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). diff --git a/configs/sure-pic32mx/src/pic32mx_boot.c b/configs/sure-pic32mx/src/pic32mx_boot.c index 86c25d0a34a..969d8637897 100644 --- a/configs/sure-pic32mx/src/pic32mx_boot.c +++ b/configs/sure-pic32mx/src/pic32mx_boot.c @@ -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 diff --git a/configs/sure-pic32mx/src/pic32mx_nsh.c b/configs/sure-pic32mx/src/pic32mx_nsh.c index 5a1cdba4701..a59d09d05b1 100644 --- a/configs/sure-pic32mx/src/pic32mx_nsh.c +++ b/configs/sure-pic32mx/src/pic32mx_nsh.c @@ -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", diff --git a/configs/sure-pic32mx/src/pic32mx_spi.c b/configs/sure-pic32mx/src/pic32mx_spi.c index bc6057bb4aa..dc7cd4334b2 100644 --- a/configs/sure-pic32mx/src/pic32mx_spi.c +++ b/configs/sure-pic32mx/src/pic32mx_spi.c @@ -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).