summaryrefslogtreecommitdiff
path: root/nuttx/configs/sam4e-ek/src/sam_spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/configs/sam4e-ek/src/sam_spi.c')
-rw-r--r--nuttx/configs/sam4e-ek/src/sam_spi.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/nuttx/configs/sam4e-ek/src/sam_spi.c b/nuttx/configs/sam4e-ek/src/sam_spi.c
index 5338d1ffe..714a643ed 100644
--- a/nuttx/configs/sam4e-ek/src/sam_spi.c
+++ b/nuttx/configs/sam4e-ek/src/sam_spi.c
@@ -53,7 +53,7 @@
#include "sam_spi.h"
#include "sam4e-ek.h"
-#if defined(CONFIG_SAM34_SPI0) || defined(CONFIG_SAM34_SPI1)
+#if defined(CONFIG_SAM34_SPI0)
/************************************************************************************
* Definitions
@@ -99,22 +99,22 @@ void weak_function sam_spiinitialize(void)
* ZigBee support.
*/
- /* The touchscreen connects using NPCS2 (PC14). */
+ /* The touchscreen connects using NPCS0 (PA11). */
#if defined(CONFIG_INPUT) && defined(CONFIG_INPUT_ADS7843E)
- sam_configgpio(GPIO_TSC_NPCS2);
+ sam_configgpio(GPIO_TSC_CS);
#endif
}
/****************************************************************************
- * Name: sam_spiselect, sam_spistatus, and sam_spicmddata
+ * Name: sam_spi0select, sam_spi0status, and sam_spic0mddata
*
* Description:
* These external functions must be provided by board-specific logic. They
* include:
*
- * o sam_spiselect is a functions tomanage the board-specific chip selects
- * o sam_spistatus and sam_spicmddata: Implementations of the status
+ * o sam_spi0select is a functions tomanage the board-specific chip selects
+ * 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.
@@ -123,11 +123,11 @@ void weak_function sam_spiinitialize(void)
*
* 1. Provide logic in sam_boardinitialize() to configure SPI chip select
* pins.
- * 2. Provide sam_spiselect() and sam_spistatus() functions in your board-
+ * 2. Provide sam_spi0select() and sam_spi0status() functions in your board-
* specific logic. These functions will perform chip selection and
* status operations using GPIOs in the way your board is configured.
* 2. If CONFIG_SPI_CMDDATA is defined in the NuttX configuration, provide
- * sam_spicmddata() functions in your board-specific logic. This
+ * 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
@@ -140,7 +140,7 @@ void weak_function sam_spiinitialize(void)
****************************************************************************/
/****************************************************************************
- * Name: sam_spiselect
+ * Name: sam_spi0select
*
* Description:
* PIO chip select pins may be programmed by the board specific logic in
@@ -164,7 +164,7 @@ void weak_function sam_spiinitialize(void)
*
****************************************************************************/
-void sam_spiselect(enum spi_dev_e devid, bool selected)
+void sam_spi0select(enum spi_dev_e devid, bool selected)
{
/* The touchscreen chip select is implemented as a GPIO OUTPUT that must
* be controlled by this function. This is because the ADS7843E driver
@@ -177,13 +177,13 @@ void sam_spiselect(enum spi_dev_e devid, bool selected)
#if defined(CONFIG_INPUT) && defined(CONFIG_INPUT_ADS7843E)
if (devid == SPIDEV_TOUCHSCREEN)
{
- sam_gpiowrite(GPIO_TSC_NPCS2, !selected);
+ sam_gpiowrite(GPIO_TSC_CS, !selected);
}
#endif
}
/****************************************************************************
- * Name: sam_spistatus
+ * Name: sam_spi0status
*
* Description:
* Return status information associated with the SPI device.
@@ -196,7 +196,7 @@ void sam_spiselect(enum spi_dev_e devid, bool selected)
*
****************************************************************************/
-uint8_t sam_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
+uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
{
return 0;
}