For SAM MCUs, rename up_spiinitialize to sam_spibus_initialize
This commit is contained in:
parent
9f2a839ac3
commit
e792b09830
@ -86,14 +86,14 @@
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: sam_spiinitialize
|
||||
* Name: sam_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select GPIO pins for the SAM3U-EK board.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void weak_function sam_spiinitialize(void)
|
||||
void weak_function sam_spidev_initialize(void)
|
||||
{
|
||||
/* The ZigBee module connects used NPCS0. However, there is not yet any
|
||||
* ZigBee support.
|
||||
@ -117,7 +117,7 @@ void weak_function sam_spiinitialize(void)
|
||||
* o sam_spi0status and sam_spic0mddata: Implementations of the status
|
||||
* and cmddata methods of the SPI interface defined by struct spi_ops_
|
||||
* (see include/nuttx/spi/spi.h). All other methods including
|
||||
* up_spiinitialize()) are provided by common SAM3/4 logic.
|
||||
* sam_spibus_initialize()) are provided by common SAM3/4 logic.
|
||||
*
|
||||
* To use this common SPI logic on your board:
|
||||
*
|
||||
@ -130,9 +130,9 @@ void weak_function sam_spiinitialize(void)
|
||||
* sam_spic0mddata() functions in your board-specific logic. This
|
||||
* function 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 sam_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 sam_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).
|
||||
|
@ -51,6 +51,8 @@
|
||||
#include <nuttx/input/ads7843e.h>
|
||||
|
||||
#include "sam_gpio.h"
|
||||
#include "sam_spi.h"
|
||||
|
||||
#include "sam3u-ek.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -250,7 +252,7 @@ int board_tsc_setup(int minor)
|
||||
|
||||
/* Get an instance of the SPI interface for the touchscreen chip select */
|
||||
|
||||
dev = up_spiinitialize(TSC_CSNUM);
|
||||
dev = sam_spibus_initialize(TSC_CSNUM);
|
||||
if (!dev)
|
||||
{
|
||||
idbg("Failed to initialize SPI chip select %d\n", TSC_CSNUM);
|
||||
@ -263,7 +265,7 @@ int board_tsc_setup(int minor)
|
||||
if (ret < 0)
|
||||
{
|
||||
idbg("Failed to initialize SPI chip select %d\n", TSC_CSNUM);
|
||||
/* up_spiuninitialize(dev); */
|
||||
/* sam_spibus_uninitialize(dev); */
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,8 @@
|
||||
#include <nuttx/input/ads7843e.h>
|
||||
|
||||
#include "sam_gpio.h"
|
||||
#include "sam_spi.h"
|
||||
|
||||
#include "sam4e-ek.h"
|
||||
|
||||
#if defined(CONFIG_INPUT) && defined(CONFIG_INPUT_ADS7843E)
|
||||
@ -247,7 +249,7 @@ int board_tsc_setup(int minor)
|
||||
|
||||
/* Get an instance of the SPI interface for the touchscreen chip select */
|
||||
|
||||
dev = up_spiinitialize(TSC_CSNUM);
|
||||
dev = sam_spibus_initialize(TSC_CSNUM);
|
||||
if (!dev)
|
||||
{
|
||||
idbg("Failed to initialize SPI chip select %d\n", TSC_CSNUM);
|
||||
@ -260,7 +262,7 @@ int board_tsc_setup(int minor)
|
||||
if (ret < 0)
|
||||
{
|
||||
idbg("Failed to initialize SPI chip select %d\n", TSC_CSNUM);
|
||||
/* up_spiuninitialize(dev); */
|
||||
/* sam_spibus_uninitialize(dev); */
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ int sam_at25_automount(int minor)
|
||||
{
|
||||
/* No.. Get the SPI port driver */
|
||||
|
||||
spi = up_spiinitialize(FLASH_CSNUM);
|
||||
spi = sam_spibus_initialize(FLASH_CSNUM);
|
||||
if (!spi)
|
||||
{
|
||||
fdbg("ERROR: Failed to initialize SPI port %d\n", FLASH_CSNUM);
|
||||
|
@ -86,14 +86,14 @@
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: sam_spiinitialize
|
||||
* Name: sam_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select GPIO pins for the SAM4E-EK board.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void weak_function sam_spiinitialize(void)
|
||||
void weak_function sam_spidev_initialize(void)
|
||||
{
|
||||
#if defined(CONFIG_INPUT) && defined(CONFIG_INPUT_ADS7843E)
|
||||
/* The touchscreen connects using NPCS0 (PA11). */
|
||||
@ -119,7 +119,7 @@ void weak_function sam_spiinitialize(void)
|
||||
* o sam_spi0status and sam_spic0mddata: Implementations of the status
|
||||
* and cmddata methods of the SPI interface defined by struct spi_ops_
|
||||
* (see include/nuttx/spi/spi.h). All other methods including
|
||||
* up_spiinitialize()) are provided by common SAM3/4 logic.
|
||||
* sam_spibus_initialize()) are provided by common SAM3/4 logic.
|
||||
*
|
||||
* To use this common SPI logic on your board:
|
||||
*
|
||||
@ -132,9 +132,9 @@ void weak_function sam_spiinitialize(void)
|
||||
* sam_spic0mddata() functions in your board-specific logic. This
|
||||
* function 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 sam_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 sam_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).
|
||||
|
@ -46,6 +46,8 @@
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
|
||||
#include "sam_spi.h"
|
||||
|
||||
#include "sam4l-xplained.h"
|
||||
|
||||
#ifdef CONFIG_SAM4L_XPLAINED_IOMODULE
|
||||
@ -94,7 +96,7 @@ int sam_sdinitialize(int minor)
|
||||
|
||||
fvdbg("Initializing SPI chip select %d\n", SD_CSNO);
|
||||
|
||||
spi = up_spiinitialize(SD_CSNO);
|
||||
spi = sam_spibus_initialize(SD_CSNO);
|
||||
if (!spi)
|
||||
{
|
||||
fdbg("Failed to initialize SPI chip select %d\n", SD_CSNO);
|
||||
|
@ -81,14 +81,14 @@
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: sam_spiinitialize
|
||||
* Name: sam_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select GPIO pins for the SAM3U10E-EVAL board.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void weak_function sam_spiinitialize(void)
|
||||
void weak_function sam_spidev_initialize(void)
|
||||
{
|
||||
/* The I/O module containing the SD connector may or may not be installed. And, if
|
||||
* it is installed, it may be in connector EXT1 or EXT2.
|
||||
@ -118,7 +118,7 @@ void weak_function sam_spiinitialize(void)
|
||||
* o sam_spi0status and sam_spic0mddata: Implementations of the status
|
||||
* and cmddata methods of the SPI interface defined by struct spi_ops_
|
||||
* (see include/nuttx/spi/spi.h). All other methods including
|
||||
* up_spiinitialize()) are provided by common SAM3/4 logic.
|
||||
* sam_spibus_initialize()) are provided by common SAM3/4 logic.
|
||||
*
|
||||
* To use this common SPI logic on your board:
|
||||
*
|
||||
@ -131,9 +131,9 @@ void weak_function sam_spiinitialize(void)
|
||||
* sam_spic0mddata() functions in your board-specific logic. This
|
||||
* function 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 sam_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 sam_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).
|
||||
|
@ -86,6 +86,8 @@
|
||||
#include <nuttx/lcd/ssd1306.h>
|
||||
|
||||
#include "sam_gpio.h"
|
||||
#include "sam_spi.h"
|
||||
|
||||
#include "sam4l-xplained.h"
|
||||
|
||||
#ifdef CONFIG_SAM4L_XPLAINED_OLED1MODULE
|
||||
@ -152,7 +154,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
|
||||
/* Get the SPI1 port interface */
|
||||
|
||||
spi = up_spiinitialize(OLED_CSNO);
|
||||
spi = sam_spibus_initialize(OLED_CSNO);
|
||||
if (!spi)
|
||||
{
|
||||
lcddbg("Failed to initialize SPI port 1\n");
|
||||
|
@ -84,7 +84,7 @@ int sam_at25_automount(int minor)
|
||||
{
|
||||
/* No.. Get the SPI port driver */
|
||||
|
||||
spi = up_spiinitialize(AT25_PORT);
|
||||
spi = sam_spibus_initialize(AT25_PORT);
|
||||
if (!spi)
|
||||
{
|
||||
fdbg("ERROR: Failed to initialize SPI port %d\n", AT25_PORT);
|
||||
|
@ -86,14 +86,14 @@
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: sam_spiinitialize
|
||||
* Name: sam_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select PIO pins for the SAMA5D3-Xplained board.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void weak_function sam_spiinitialize(void)
|
||||
void weak_function sam_spidev_initialize(void)
|
||||
{
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
#ifdef CONFIG_MTD_AT25
|
||||
@ -118,7 +118,7 @@ void weak_function sam_spiinitialize(void)
|
||||
* o sam_spi[0|1]status and sam_spi[0|1]cmddata: Implementations of the status
|
||||
* and cmddata methods of the SPI interface defined by struct spi_ops_
|
||||
* (see include/nuttx/spi/spi.h). All other methods including
|
||||
* up_spiinitialize()) are provided by common SAM3/4 logic.
|
||||
* sam_spibus_initialize()) are provided by common SAM3/4 logic.
|
||||
*
|
||||
* To use this common SPI logic on your board:
|
||||
*
|
||||
@ -131,9 +131,9 @@ void weak_function sam_spiinitialize(void)
|
||||
* sam_spi[0|1]cmddata() functions in your board-specific logic. This
|
||||
* function will perform cmd/data selection operations using PIOs in
|
||||
* the way your board is configured.
|
||||
* 3. Add a call to up_spiinitialize() in your low level application
|
||||
* 3. Add a call to sam_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 sam_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).
|
||||
|
@ -84,7 +84,7 @@ int sam_at25_automount(int minor)
|
||||
{
|
||||
/* No.. Get the SPI port driver */
|
||||
|
||||
spi = up_spiinitialize(AT25_PORT);
|
||||
spi = sam_spibus_initialize(AT25_PORT);
|
||||
if (!spi)
|
||||
{
|
||||
fdbg("ERROR: Failed to initialize SPI port %d\n", AT25_PORT);
|
||||
|
@ -86,14 +86,14 @@
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: sam_spiinitialize
|
||||
* Name: sam_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select PIO pins for the SAMA5D3x-EK board.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void weak_function sam_spiinitialize(void)
|
||||
void weak_function sam_spidev_initialize(void)
|
||||
{
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
#ifdef CONFIG_MTD_AT25
|
||||
@ -118,7 +118,7 @@ void weak_function sam_spiinitialize(void)
|
||||
* o sam_spi[0|1]status and sam_spi[0|1]cmddata: Implementations of the status
|
||||
* and cmddata methods of the SPI interface defined by struct spi_ops_
|
||||
* (see include/nuttx/spi/spi.h). All other methods including
|
||||
* up_spiinitialize()) are provided by common SAM3/4 logic.
|
||||
* sam_spibus_initialize()) are provided by common SAM3/4 logic.
|
||||
*
|
||||
* To use this common SPI logic on your board:
|
||||
*
|
||||
@ -131,9 +131,9 @@ void weak_function sam_spiinitialize(void)
|
||||
* sam_spi[0|1]cmddata() functions in your board-specific logic. This
|
||||
* function will perform cmd/data selection operations using PIOs in
|
||||
* the way your board is configured.
|
||||
* 3. Add a call to up_spiinitialize() in your low level application
|
||||
* 3. Add a call to sam_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 sam_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).
|
||||
|
@ -89,7 +89,7 @@ int sam_at25_automount(int minor)
|
||||
{
|
||||
/* No.. Get the SPI port driver */
|
||||
|
||||
spi = up_spiinitialize(AT25_PORT);
|
||||
spi = sam_spibus_initialize(AT25_PORT);
|
||||
if (!spi)
|
||||
{
|
||||
fdbg("ERROR: Failed to initialize SPI port %d\n", AT25_PORT);
|
||||
|
@ -86,14 +86,14 @@
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: sam_spiinitialize
|
||||
* Name: sam_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select PIO pins for the SAMA5D4-EK board.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void weak_function sam_spiinitialize(void)
|
||||
void weak_function sam_spidev_initialize(void)
|
||||
{
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
#ifdef CONFIG_MTD_AT25
|
||||
@ -118,7 +118,7 @@ void weak_function sam_spiinitialize(void)
|
||||
* o sam_spi[0|1]status and sam_spi[0|1]cmddata: Implementations of the status
|
||||
* and cmddata methods of the SPI interface defined by struct spi_ops_
|
||||
* (see include/nuttx/spi/spi.h). All other methods including
|
||||
* up_spiinitialize()) are provided by common SAM3/4 logic.
|
||||
* sam_spibus_initialize()) are provided by common SAM3/4 logic.
|
||||
*
|
||||
* To use this common SPI logic on your board:
|
||||
*
|
||||
@ -131,9 +131,9 @@ void weak_function sam_spiinitialize(void)
|
||||
* sam_spi[0|1]cmddata() functions in your board-specific logic. This
|
||||
* function will perform cmd/data selection operations using PIOs in
|
||||
* the way your board is configured.
|
||||
* 3. Add a call to up_spiinitialize() in your low level application
|
||||
* 3. Add a call to sam_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 sam_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).
|
||||
|
@ -47,6 +47,8 @@
|
||||
#include <nuttx/mmcsd.h>
|
||||
|
||||
#include "sam_config.h"
|
||||
#include "sam_spi.h"
|
||||
|
||||
#include "samd20-xplained.h"
|
||||
|
||||
#ifdef CONFIG_SAMD20_XPLAINED_IOMODULE
|
||||
@ -95,7 +97,7 @@ int sam_sdinitialize(int port, int minor)
|
||||
|
||||
fvdbg("Initializing SERCOM SPI%d\n", port);
|
||||
|
||||
spi = up_spiinitialize(port);
|
||||
spi = sam_spibus_initialize(port);
|
||||
if (!spi)
|
||||
{
|
||||
fdbg("Failed to initialize SPI%d\n", port);
|
||||
|
@ -84,7 +84,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spiinitialize
|
||||
* Name: sam_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select PORT pins for the SAMD20 Xplained
|
||||
@ -92,7 +92,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void weak_function sam_spiinitialize(void)
|
||||
void weak_function sam_spidev_initialize(void)
|
||||
{
|
||||
/* The I/O module containing the SD connector may or may not be installed. And, if
|
||||
* it is installed, it may be in connector EXT1 or EXT2.
|
||||
@ -123,7 +123,7 @@ void weak_function sam_spiinitialize(void)
|
||||
* o sam_spi[n]status and sam_spi[n]cmddata: Implementations of the status
|
||||
* and cmddata methods of the SPI interface defined by struct spi_ops_
|
||||
* (see include/nuttx/spi/spi.h). All other methods including
|
||||
* up_spiinitialize()) are provided by common SAMD/L logic.
|
||||
* sam_spibus_initialize()) are provided by common SAMD/L logic.
|
||||
*
|
||||
* Where [n] is the SERCOM number for the SPI module.
|
||||
*
|
||||
@ -138,9 +138,9 @@ void weak_function sam_spiinitialize(void)
|
||||
* sam_spi[n]cmddata() functions in your board-specific logic. This
|
||||
* function 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 sam_spibus_initialize() in your low level application
|
||||
* initialization logic
|
||||
* 4. The handle returned by up_spiinitialize() may then be used to bind
|
||||
* 4. The handle returned by sam_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).
|
||||
|
@ -116,6 +116,8 @@
|
||||
#include <nuttx/lcd/ssd1306.h>
|
||||
|
||||
#include "sam_port.h"
|
||||
#include "sam_spi.h"
|
||||
|
||||
#include "samd20-xplained.h"
|
||||
|
||||
#ifdef CONFIG_SAMD20_XPLAINED_OLED1MODULE
|
||||
@ -182,7 +184,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
|
||||
/* Get the SPI1 port interface */
|
||||
|
||||
spi = up_spiinitialize(OLED_CSNO);
|
||||
spi = sam_spibus_initialize(OLED_CSNO);
|
||||
if (!spi)
|
||||
{
|
||||
lcddbg("Failed to initialize SPI port 1\n");
|
||||
|
@ -47,6 +47,8 @@
|
||||
#include <nuttx/mmcsd.h>
|
||||
|
||||
#include "sam_config.h"
|
||||
#include "sam_spi.h"
|
||||
|
||||
#include "samd21-xplained.h"
|
||||
|
||||
#ifdef CONFIG_SAMD21_XPLAINED_IOMODULE
|
||||
@ -95,7 +97,7 @@ int sam_sdinitialize(int port, int minor)
|
||||
|
||||
fvdbg("Initializing SERCOM SPI%d\n", port);
|
||||
|
||||
spi = up_spiinitialize(port);
|
||||
spi = sam_spibus_initialize(port);
|
||||
if (!spi)
|
||||
{
|
||||
fdbg("Failed to initialize SPI%d\n", port);
|
||||
|
@ -84,7 +84,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spiinitialize
|
||||
* Name: sam_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select PORT pins for the SAMD21 Xplained
|
||||
@ -92,7 +92,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void weak_function sam_spiinitialize(void)
|
||||
void weak_function sam_spidev_initialize(void)
|
||||
{
|
||||
/* The I/O module containing the SD connector may or may not be installed. And, if
|
||||
* it is installed, it may be in connector EXT1 or EXT2.
|
||||
@ -123,7 +123,7 @@ void weak_function sam_spiinitialize(void)
|
||||
* o sam_spi[n]status and sam_spi[n]cmddata: Implementations of the status
|
||||
* and cmddata methods of the SPI interface defined by struct spi_ops_
|
||||
* (see include/nuttx/spi/spi.h). All other methods including
|
||||
* up_spiinitialize()) are provided by common SAMD/L logic.
|
||||
* sam_spibus_initialize()) are provided by common SAMD/L logic.
|
||||
*
|
||||
* Where [n] is the SERCOM number for the SPI module.
|
||||
*
|
||||
@ -138,9 +138,9 @@ void weak_function sam_spiinitialize(void)
|
||||
* sam_spi[n]cmddata() functions in your board-specific logic. This
|
||||
* function 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 sam_spibus_initialize() in your low level application
|
||||
* initialization logic
|
||||
* 4. The handle returned by up_spiinitialize() may then be used to bind
|
||||
* 4. The handle returned by sam_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).
|
||||
|
@ -116,6 +116,8 @@
|
||||
#include <nuttx/lcd/ssd1306.h>
|
||||
|
||||
#include "sam_port.h"
|
||||
#include "sam_spi.h"
|
||||
|
||||
#include "samd21-xplained.h"
|
||||
|
||||
#ifdef CONFIG_SAMD21_XPLAINED_OLED1MODULE
|
||||
@ -182,7 +184,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
|
||||
/* Get the SPI1 port interface */
|
||||
|
||||
spi = up_spiinitialize(OLED_CSNO);
|
||||
spi = sam_spibus_initialize(OLED_CSNO);
|
||||
if (!spi)
|
||||
{
|
||||
lcddbg("Failed to initialize SPI port 1\n");
|
||||
|
@ -86,14 +86,14 @@
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: sam_spi_initialize
|
||||
* Name: sam_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select PIO pins for the SAME70-XPLD board.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void sam_spi_initialize(void)
|
||||
void sam_spidev_initialize(void)
|
||||
{
|
||||
#ifdef CONFIG_SAMV7_SPI0_MASTER
|
||||
#endif
|
||||
@ -119,7 +119,7 @@ void sam_spi_initialize(void)
|
||||
* o sam_spi[0|1]status and sam_spi[0|1]cmddata: Implementations of the status
|
||||
* and cmddata methods of the SPI interface defined by struct spi_ops_
|
||||
* (see include/nuttx/spi/spi.h). All other methods including
|
||||
* up_spiinitialize()) are provided by common SAM3/4 logic.
|
||||
* sam_spibus_initialize()) are provided by common SAM3/4 logic.
|
||||
*
|
||||
* To use this common SPI logic on your board:
|
||||
*
|
||||
@ -132,9 +132,9 @@ void sam_spi_initialize(void)
|
||||
* sam_spi[0|1]cmddata() functions in your board-specific logic. This
|
||||
* function will perform cmd/data selection operations using PIOs in
|
||||
* the way your board is configured.
|
||||
* 3. Add a call to up_spiinitialize() in your low level application
|
||||
* 3. Add a call to sam_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 sam_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).
|
||||
|
@ -47,6 +47,8 @@
|
||||
#include <nuttx/mmcsd.h>
|
||||
|
||||
#include "sam_config.h"
|
||||
#include "sam_spi.h"
|
||||
|
||||
#include "saml21-xplained.h"
|
||||
|
||||
#ifdef CONFIG_SAML21_XPLAINED_IOMODULE
|
||||
@ -95,7 +97,7 @@ int sam_sdinitialize(int port, int minor)
|
||||
|
||||
fvdbg("Initializing SERCOM SPI%d\n", port);
|
||||
|
||||
spi = up_spiinitialize(port);
|
||||
spi = sam_spibus_initialize(port);
|
||||
if (!spi)
|
||||
{
|
||||
fdbg("Failed to initialize SPI%d\n", port);
|
||||
|
@ -84,7 +84,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spiinitialize
|
||||
* Name: sam_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select PORT pins for the SAML21 Xplained
|
||||
@ -92,7 +92,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void weak_function sam_spiinitialize(void)
|
||||
void weak_function sam_spidev_initialize(void)
|
||||
{
|
||||
/* The I/O module containing the SD connector may or may not be installed. And, if
|
||||
* it is installed, it may be in connector EXT1 or EXT2.
|
||||
@ -123,7 +123,7 @@ void weak_function sam_spiinitialize(void)
|
||||
* o sam_spi[n]status and sam_spi[n]cmddata: Implementations of the status
|
||||
* and cmddata methods of the SPI interface defined by struct spi_ops_
|
||||
* (see include/nuttx/spi/spi.h). All other methods including
|
||||
* up_spiinitialize()) are provided by common SAMD/L logic.
|
||||
* sam_spibus_initialize()) are provided by common SAMD/L logic.
|
||||
*
|
||||
* Where [n] is the SERCOM number for the SPI module.
|
||||
*
|
||||
@ -138,9 +138,9 @@ void weak_function sam_spiinitialize(void)
|
||||
* sam_spi[n]cmddata() functions in your board-specific logic. This
|
||||
* function 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 sam_spibus_initialize() in your low level application
|
||||
* initialization logic
|
||||
* 4. The handle returned by up_spiinitialize() may then be used to bind
|
||||
* 4. The handle returned by sam_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).
|
||||
|
@ -116,6 +116,8 @@
|
||||
#include <nuttx/lcd/ssd1306.h>
|
||||
|
||||
#include "sam_port.h"
|
||||
#include "sam_spi.h"
|
||||
|
||||
#include "saml21-xplained.h"
|
||||
|
||||
#ifdef CONFIG_SAML21_XPLAINED_OLED1MODULE
|
||||
@ -182,7 +184,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
|
||||
/* Get the SPI1 port interface */
|
||||
|
||||
spi = up_spiinitialize(OLED_CSNO);
|
||||
spi = sam_spibus_initialize(OLED_CSNO);
|
||||
if (!spi)
|
||||
{
|
||||
lcddbg("Failed to initialize SPI port 1\n");
|
||||
|
@ -86,14 +86,14 @@
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: sam_spi_initialize
|
||||
* Name: sam_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select PIO pins for the SAMV71-XULT board.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void sam_spi_initialize(void)
|
||||
void sam_spidev_initialize(void)
|
||||
{
|
||||
#ifdef CONFIG_SAMV7_SPI0_MASTER
|
||||
#endif
|
||||
@ -119,7 +119,7 @@ void sam_spi_initialize(void)
|
||||
* o sam_spi[0|1]status and sam_spi[0|1]cmddata: Implementations of the status
|
||||
* and cmddata methods of the SPI interface defined by struct spi_ops_
|
||||
* (see include/nuttx/spi/spi.h). All other methods including
|
||||
* up_spiinitialize()) are provided by common SAM3/4 logic.
|
||||
* sam_spibus_initialize()) are provided by common SAM3/4 logic.
|
||||
*
|
||||
* To use this common SPI logic on your board:
|
||||
*
|
||||
@ -132,9 +132,9 @@ void sam_spi_initialize(void)
|
||||
* sam_spi[0|1]cmddata() functions in your board-specific logic. This
|
||||
* function will perform cmd/data selection operations using PIOs in
|
||||
* the way your board is configured.
|
||||
* 3. Add a call to up_spiinitialize() in your low level application
|
||||
* 3. Add a call to sam_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 sam_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).
|
||||
|
Loading…
Reference in New Issue
Block a user