For AVR MCUs, rename up_spiinitialize to avr_spibus_initialize
This commit is contained in:
parent
e6971a562e
commit
45e471354b
@ -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
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -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
|
||||
|
||||
|
@ -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).
|
||||
*
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
/************************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user