From 45e471354b1304076023e97ebb1a1ef8e0f2e49b Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 27 Jan 2016 07:59:11 -0600 Subject: [PATCH] For AVR MCUs, rename up_spiinitialize to avr_spibus_initialize --- configs/amber/src/amber.h | 4 ++-- configs/amber/src/atmega_boot.c | 6 +++--- configs/micropendous3/src/at90usb_boot.c | 6 +++--- configs/micropendous3/src/micropendous3.h | 4 ++-- configs/moteino-mega/src/avr_boot.c | 6 +++--- configs/moteino-mega/src/moteino_mega.h | 4 ++-- configs/teensy-2.0/src/at90usb_boot.c | 6 +++--- configs/teensy-2.0/src/at90usb_spi.c | 10 +++++----- configs/teensy-2.0/src/at90usb_usbmsc.c | 4 ++-- configs/teensy-2.0/src/teensy-20.h | 4 ++-- 10 files changed, 27 insertions(+), 27 deletions(-) diff --git a/configs/amber/src/amber.h b/configs/amber/src/amber.h index 683611cd85..770b08ba4a 100644 --- a/configs/amber/src/amber.h +++ b/configs/amber/src/amber.h @@ -70,7 +70,7 @@ extern "C" #endif /************************************************************************************ - * Name: atmega_spiinitialize + * Name: atmega_spidev_initialize * * Description: * Called to configure SPI chip select GPIO pins for the Amber Web Server. @@ -78,7 +78,7 @@ extern "C" ************************************************************************************/ #if defined(CONFIG_AVR_SPI1) || defined(CONFIG_AVR_SPI2) -void weak_function atmega_spiinitialize(void); +void weak_function atmega_spidev_initialize(void); #endif /************************************************************************************ diff --git a/configs/amber/src/atmega_boot.c b/configs/amber/src/atmega_boot.c index 10cc3873c7..3f6c28db60 100644 --- a/configs/amber/src/atmega_boot.c +++ b/configs/amber/src/atmega_boot.c @@ -74,13 +74,13 @@ void atmega_boardinitialize(void) { /* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak - * function atmega_spiinitialize() has been brought into the link. + * function atmega_spidev_initialize() has been brought into the link. */ #if defined(CONFIG_AVR_SPI1) || defined(CONFIG_AVR_SPI2) - if (atmega_spiinitialize) + if (atmega_spidev_initialize) { - atmega_spiinitialize(); + atmega_spidev_initialize(); } #endif diff --git a/configs/micropendous3/src/at90usb_boot.c b/configs/micropendous3/src/at90usb_boot.c index 00312596a4..e4a0a277c9 100644 --- a/configs/micropendous3/src/at90usb_boot.c +++ b/configs/micropendous3/src/at90usb_boot.c @@ -74,13 +74,13 @@ void at90usb_boardinitialize(void) { /* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak - * function at90usb_spiinitialize() has been brought into the link. + * function at90usb_spidev_initialize() has been brought into the link. */ #if defined(CONFIG_AVR_SPI1) || defined(CONFIG_AVR_SPI2) - if (at90usb_spiinitialize) + if (at90usb_spidev_initialize) { - at90usb_spiinitialize(); + at90usb_spidev_initialize(); } #endif diff --git a/configs/micropendous3/src/micropendous3.h b/configs/micropendous3/src/micropendous3.h index 53c4c7d849..6d8b963103 100644 --- a/configs/micropendous3/src/micropendous3.h +++ b/configs/micropendous3/src/micropendous3.h @@ -69,7 +69,7 @@ extern "C" { #endif /************************************************************************************ - * Name: at90usb_spiinitialize + * Name: at90usb_spidev_initialize * * Description: * Called to configure SPI chip select GPIO pins for the Micropendous3 board. @@ -77,7 +77,7 @@ extern "C" { ************************************************************************************/ #if defined(CONFIG_AVR_SPI1) || defined(CONFIG_AVR_SPI2) -EXTERN void weak_function at90usb_spiinitialize(void); +EXTERN void weak_function at90usb_spidev_initialize(void); #endif /************************************************************************************ diff --git a/configs/moteino-mega/src/avr_boot.c b/configs/moteino-mega/src/avr_boot.c index f1df1fd1a4..b9d6e3380d 100644 --- a/configs/moteino-mega/src/avr_boot.c +++ b/configs/moteino-mega/src/avr_boot.c @@ -74,13 +74,13 @@ void atmega_boardinitialize(void) { /* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak - * function atmega_spiinitialize() has been brought into the link. + * function atmega_spidev_initialize() has been brought into the link. */ #if defined(CONFIG_AVR_SPI1) || defined(CONFIG_AVR_SPI2) - if (atmega_spiinitialize) + if (atmega_spidev_initialize) { - atmega_spiinitialize(); + atmega_spidev_initialize(); } #endif diff --git a/configs/moteino-mega/src/moteino_mega.h b/configs/moteino-mega/src/moteino_mega.h index 370d8323bb..cbd5c1596b 100644 --- a/configs/moteino-mega/src/moteino_mega.h +++ b/configs/moteino-mega/src/moteino_mega.h @@ -70,7 +70,7 @@ extern "C" #endif /************************************************************************************ - * Name: atmega_spiinitialize + * Name: atmega_spidev_initialize * * Description: * Called to configure SPI chip select GPIO pins for the Amber Web Server. @@ -78,7 +78,7 @@ extern "C" ************************************************************************************/ #if defined(CONFIG_AVR_SPI1) || defined(CONFIG_AVR_SPI2) -void weak_function atmega_spiinitialize(void); +void weak_function atmega_spidev_initialize(void); #endif /************************************************************************************ diff --git a/configs/teensy-2.0/src/at90usb_boot.c b/configs/teensy-2.0/src/at90usb_boot.c index b6bfbdb6df..ad3379a42f 100644 --- a/configs/teensy-2.0/src/at90usb_boot.c +++ b/configs/teensy-2.0/src/at90usb_boot.c @@ -74,13 +74,13 @@ void at90usb_boardinitialize(void) { /* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak - * function at90usb_spiinitialize() has been brought into the link. + * function at90usb_spidev_initialize() has been brought into the link. */ #ifdef CONFIG_AVR_SPI - if (at90usb_spiinitialize) + if (at90usb_spidev_initialize) { - at90usb_spiinitialize(); + at90usb_spidev_initialize(); } #endif diff --git a/configs/teensy-2.0/src/at90usb_spi.c b/configs/teensy-2.0/src/at90usb_spi.c index 22b89aced4..4c3e1622ce 100644 --- a/configs/teensy-2.0/src/at90usb_spi.c +++ b/configs/teensy-2.0/src/at90usb_spi.c @@ -108,14 +108,14 @@ ************************************************************************************/ /************************************************************************************ - * Name: at90usb_spiinitialize + * Name: at90usb_spidev_initialize * * Description: * Called to configure SPI chip select GPIO pins for the LPC1766-STK. * ************************************************************************************/ -void weak_function at90usb_spiinitialize(void) +void weak_function at90usb_spidev_initialize(void) { /* The Teensy board has no dedicated SPI devices so we assume that SS is used * for chip select: @@ -144,16 +144,16 @@ void weak_function at90usb_spiinitialize(void) * The external functions, avr_spiselect and avr_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()) are provided by common AVR logic. + * other methods (including avr_spibus_initialize()) are provided by common AVR logic. * To use this common SPI logic on your board: * * 1. Provide logic in avr_sspinitialize() to configure SPI chip select pins. * 2. Provide avr_spiselect() and avr_spistatus() functions in your board-specific * logic. These functions will perform chip selection and status operations * in the way your board is configured. - * 3. Add a calls to at90usb_spiinitialize() in your low level application + * 3. Add a calls to at90usb_spidev_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 avr_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/teensy-2.0/src/at90usb_usbmsc.c b/configs/teensy-2.0/src/at90usb_usbmsc.c index 8dd5f1cda6..21ec1b6131 100644 --- a/configs/teensy-2.0/src/at90usb_usbmsc.c +++ b/configs/teensy-2.0/src/at90usb_usbmsc.c @@ -94,10 +94,10 @@ int usbmsc_archinitialize(void) syslog(LOG_INFO, "Initializing SPI port\n"); - spi = up_spiinitialize(AVR_MMCSDSPIPORTNO); + spi = avr_spibus_initialize(AVR_MMCSDSPIPORTNO); if (!spi) { - syslog(LOG_ERR, "ERROR: up_spiinitialize failed\n"); + syslog(LOG_ERR, "ERROR: avr_spibus_initialize failed\n"); return -ENODEV; } diff --git a/configs/teensy-2.0/src/teensy-20.h b/configs/teensy-2.0/src/teensy-20.h index a1732206a6..ad1f2530bb 100644 --- a/configs/teensy-2.0/src/teensy-20.h +++ b/configs/teensy-2.0/src/teensy-20.h @@ -70,7 +70,7 @@ extern "C" #endif /************************************************************************************ - * Name: at90usb_spiinitialize + * Name: at90usb_spidev_initialize * * Description: * Called to configure SPI chip select GPIO pins for the Teensy++ 2.0 board. @@ -78,7 +78,7 @@ extern "C" ************************************************************************************/ #ifdef CONFIG_AVR_SPI -void weak_function at90usb_spiinitialize(void); +void weak_function at90usb_spidev_initialize(void); #endif /************************************************************************************