mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
More SPI initialize naming clarification
This commit is contained in:
@@ -103,14 +103,14 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lincoln60_sspinitialize
|
* Name: lincoln60_spidev_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the Lincoln 60 board.
|
* Called to configure SPI chip select GPIO pins for the Lincoln 60 board.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void weak_function lincoln60_sspinitialize(void);
|
void weak_function lincoln60_spidev_initialize(void);
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
#endif /* _CONFIGS_LINCOLN60_SRC_LINCOLN60_H */
|
#endif /* _CONFIGS_LINCOLN60_SRC_LINCOLN60_H */
|
||||||
|
|||||||
@@ -75,13 +75,13 @@
|
|||||||
void lpc11_boardinitialize(void)
|
void lpc11_boardinitialize(void)
|
||||||
{
|
{
|
||||||
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
|
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
|
||||||
* function lpcxpresso_sspinitialize() has been brought into the link.
|
* function lpcxpresso_spidev_initialize() has been brought into the link.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_LPC11_SSP0) || defined(CONFIG_LPC11_SSP1)
|
#if defined(CONFIG_LPC11_SSP0) || defined(CONFIG_LPC11_SSP1)
|
||||||
if (lpcxpresso_sspinitialize)
|
if (lpcxpresso_spidev_initialize)
|
||||||
{
|
{
|
||||||
lpcxpresso_sspinitialize();
|
lpcxpresso_spidev_initialize();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ int nsh_archinitialize(void)
|
|||||||
|
|
||||||
/* Get the SSP port */
|
/* Get the SSP port */
|
||||||
|
|
||||||
ssp = lpc11_sspinitialize(CONFIG_NSH_MMCSDSPIPORTNO);
|
ssp = lpc11_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
|
||||||
if (!ssp)
|
if (!ssp)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n",
|
syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n",
|
||||||
|
|||||||
@@ -93,18 +93,18 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lpcxpresso_sspinitialize
|
* Name: lpcxpresso_spidev_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the LPCXpresso.
|
* Called to configure SPI chip select GPIO pins for the LPCXpresso.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void weak_function lpcxpresso_sspinitialize(void)
|
void weak_function lpcxpresso_spidev_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure the SPI-based microSD CS GPIO */
|
/* Configure the SPI-based microSD CS GPIO */
|
||||||
|
|
||||||
ssp_dumpgpio("lpcxpresso_sspinitialize() Entry)");
|
ssp_dumpgpio("lpcxpresso_spidev_initialize() Entry)");
|
||||||
|
|
||||||
/* Configure card detect and chip select for the SD slot. NOTE: Jumper J55 must
|
/* Configure card detect and chip select for the SD slot. NOTE: Jumper J55 must
|
||||||
* be set correctly for the SD slot chip select.
|
* be set correctly for the SD slot chip select.
|
||||||
@@ -123,7 +123,7 @@ void weak_function lpcxpresso_sspinitialize(void)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ssp_dumpgpio("lpcxpresso_sspinitialize() Exit");
|
ssp_dumpgpio("lpcxpresso_spidev_initialize() Exit");
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
@@ -133,7 +133,7 @@ void weak_function lpcxpresso_sspinitialize(void)
|
|||||||
* The external functions, lpc11_ssp0/ssp1select and lpc11_ssp0/ssp1status
|
* The external functions, lpc11_ssp0/ssp1select and lpc11_ssp0/ssp1status
|
||||||
* must be provided by board-specific logic. They are implementations of the select
|
* 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
|
* and status methods of the SPI interface defined by struct spi_ops_s (see
|
||||||
* include/nuttx/spi/spi.h). All other methods (including lpc11_sspinitialize())
|
* include/nuttx/spi/spi.h). All other methods (including lpc11_spibus_initialize())
|
||||||
* are provided by common LPC17xx logic. To use this common SPI logic on your
|
* are provided by common LPC17xx logic. To use this common SPI logic on your
|
||||||
* board:
|
* board:
|
||||||
*
|
*
|
||||||
@@ -142,9 +142,9 @@ void weak_function lpcxpresso_sspinitialize(void)
|
|||||||
* 2. Provide lpc11_ssp0/ssp1select() and lpc11_ssp0/ssp1status() functions
|
* 2. Provide lpc11_ssp0/ssp1select() and lpc11_ssp0/ssp1status() functions
|
||||||
* in your board-specific logic. These functions will perform chip selection
|
* in your board-specific logic. These functions will perform chip selection
|
||||||
* and status operations using GPIOs in the way your board is configured.
|
* and status operations using GPIOs in the way your board is configured.
|
||||||
* 3. Add a calls to lpc11_sspinitialize() in your low level application
|
* 3. Add a calls to lpc11_spibus_initialize() in your low level application
|
||||||
* initialization logic
|
* initialization logic
|
||||||
* 4. The handle returned by lpc11_sspinitialize() may then be used to bind the
|
* 4. The handle returned by lpc11_spibus_initialize() may then be used to bind the
|
||||||
* SPI driver to higher level logic (e.g., calling
|
* SPI driver to higher level logic (e.g., calling
|
||||||
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
||||||
* the SPI MMC/SD driver).
|
* the SPI MMC/SD driver).
|
||||||
|
|||||||
@@ -221,14 +221,14 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lpcxpresso_sspinitialize
|
* Name: lpcxpresso_spidev_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the LPCXpresso board.
|
* Called to configure SPI chip select GPIO pins for the LPCXpresso board.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void weak_function lpcxpresso_sspinitialize(void);
|
void weak_function lpcxpresso_spidev_initialize(void);
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
#endif /* _CONFIGS_LPCXPRESSO_LPC1115_SRC_LPCXPRESSO_LPC1115L_H */
|
#endif /* _CONFIGS_LPCXPRESSO_LPC1115_SRC_LPCXPRESSO_LPC1115L_H */
|
||||||
|
|||||||
@@ -75,13 +75,13 @@
|
|||||||
void lpc17_boardinitialize(void)
|
void lpc17_boardinitialize(void)
|
||||||
{
|
{
|
||||||
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
|
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
|
||||||
* function lpcxpresso_sspinitialize() has been brought into the link.
|
* function lpcxpresso_spidev_initialize() has been brought into the link.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1)
|
#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1)
|
||||||
if (lpcxpresso_sspinitialize)
|
if (lpcxpresso_spidev_initialize)
|
||||||
{
|
{
|
||||||
lpcxpresso_sspinitialize();
|
lpcxpresso_spidev_initialize();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ int board_app_initialize(void)
|
|||||||
|
|
||||||
/* Get the SSP port */
|
/* Get the SSP port */
|
||||||
|
|
||||||
ssp = lpc17_sspinitialize(CONFIG_NSH_MMCSDSPIPORTNO);
|
ssp = lpc17_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
|
||||||
if (!ssp)
|
if (!ssp)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n",
|
syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n",
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
|||||||
|
|
||||||
/* Get the SPI1 port (configure as a Freescale SPI port) */
|
/* Get the SPI1 port (configure as a Freescale SPI port) */
|
||||||
|
|
||||||
spi = lpc17_sspinitialize(1);
|
spi = lpc17_spibus_initialize(1);
|
||||||
if (!spi)
|
if (!spi)
|
||||||
{
|
{
|
||||||
glldbg("Failed to initialize SPI port 1\n");
|
glldbg("Failed to initialize SPI port 1\n");
|
||||||
|
|||||||
@@ -93,18 +93,18 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lpcxpresso_sspinitialize
|
* Name: lpcxpresso_spidev_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the LPCXpresso.
|
* Called to configure SPI chip select GPIO pins for the LPCXpresso.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void weak_function lpcxpresso_sspinitialize(void)
|
void weak_function lpcxpresso_spidev_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure the SPI-based microSD CS GPIO */
|
/* Configure the SPI-based microSD CS GPIO */
|
||||||
|
|
||||||
ssp_dumpgpio("lpcxpresso_sspinitialize() Entry)");
|
ssp_dumpgpio("lpcxpresso_spidev_initialize() Entry)");
|
||||||
|
|
||||||
/* Configure card detect and chip select for the SD slot. NOTE: Jumper J55 must
|
/* Configure card detect and chip select for the SD slot. NOTE: Jumper J55 must
|
||||||
* be set correctly for the SD slot chip select.
|
* be set correctly for the SD slot chip select.
|
||||||
@@ -123,7 +123,7 @@ void weak_function lpcxpresso_sspinitialize(void)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ssp_dumpgpio("lpcxpresso_sspinitialize() Exit");
|
ssp_dumpgpio("lpcxpresso_spidev_initialize() Exit");
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
@@ -133,7 +133,7 @@ void weak_function lpcxpresso_sspinitialize(void)
|
|||||||
* The external functions, lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status
|
* The external functions, lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status
|
||||||
* must be provided by board-specific logic. They are implementations of the select
|
* 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
|
* and status methods of the SPI interface defined by struct spi_ops_s (see
|
||||||
* include/nuttx/spi/spi.h). All other methods (including lpc17_sspinitialize())
|
* include/nuttx/spi/spi.h). All other methods (including lpc17_spibus_initialize())
|
||||||
* are provided by common LPC17xx logic. To use this common SPI logic on your
|
* are provided by common LPC17xx logic. To use this common SPI logic on your
|
||||||
* board:
|
* board:
|
||||||
*
|
*
|
||||||
@@ -142,9 +142,9 @@ void weak_function lpcxpresso_sspinitialize(void)
|
|||||||
* 2. Provide lpc17_ssp0/ssp1select() and lpc17_ssp0/ssp1status() functions
|
* 2. Provide lpc17_ssp0/ssp1select() and lpc17_ssp0/ssp1status() functions
|
||||||
* in your board-specific logic. These functions will perform chip selection
|
* in your board-specific logic. These functions will perform chip selection
|
||||||
* and status operations using GPIOs in the way your board is configured.
|
* and status operations using GPIOs in the way your board is configured.
|
||||||
* 3. Add a calls to lpc17_sspinitialize() in your low level application
|
* 3. Add a calls to lpc17_spibus_initialize() in your low level application
|
||||||
* initialization logic
|
* initialization logic
|
||||||
* 4. The handle returned by lpc17_sspinitialize() may then be used to bind the
|
* 4. The handle returned by lpc17_spibus_initialize() may then be used to bind the
|
||||||
* SPI driver to higher level logic (e.g., calling
|
* SPI driver to higher level logic (e.g., calling
|
||||||
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
||||||
* the SPI MMC/SD driver).
|
* the SPI MMC/SD driver).
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ int usbmsc_archinitialize(void)
|
|||||||
|
|
||||||
syslog(LOG_INFO, "Initializing SPI port %d\n", LPC17XX_MMCSDSPIPORTNO);
|
syslog(LOG_INFO, "Initializing SPI port %d\n", LPC17XX_MMCSDSPIPORTNO);
|
||||||
|
|
||||||
spi = lpc17_sspinitialize(LPC17XX_MMCSDSPIPORTNO);
|
spi = lpc17_spibus_initialize(LPC17XX_MMCSDSPIPORTNO);
|
||||||
if (!spi)
|
if (!spi)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n",
|
syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n",
|
||||||
|
|||||||
@@ -221,14 +221,14 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lpcxpresso_sspinitialize
|
* Name: lpcxpresso_spidev_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the LPCXpresso board.
|
* Called to configure SPI chip select GPIO pins for the LPCXpresso board.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void weak_function lpcxpresso_sspinitialize(void);
|
void weak_function lpcxpresso_spidev_initialize(void);
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
#endif /* _CONFIGS_LPCXPRESSO_LPC1768_SRC_LPCXPRESSO_H */
|
#endif /* _CONFIGS_LPCXPRESSO_LPC1768_SRC_LPCXPRESSO_H */
|
||||||
|
|||||||
@@ -79,14 +79,14 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: mbed_sspinitialize
|
* Name: mbed_spidev_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the NUCLEUS-2G board.
|
* Called to configure SPI chip select GPIO pins for the NUCLEUS-2G board.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void weak_function mbed_sspinitialize(void);
|
void weak_function mbed_spidev_initialize(void);
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
#endif /* _CONFIGS_MBED_SRC_MBED_H */
|
#endif /* _CONFIGS_MBED_SRC_MBED_H */
|
||||||
|
|||||||
@@ -93,13 +93,13 @@ void lpc17_boardinitialize(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
|
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
|
||||||
* function nucleus2g_sspinitialize() has been brought into the link.
|
* function nucleus2g_spidev_initialize() has been brought into the link.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1)
|
#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1)
|
||||||
if (nucleus2g_sspinitialize)
|
if (nucleus2g_spidev_initialize)
|
||||||
{
|
{
|
||||||
nucleus2g_sspinitialize();
|
nucleus2g_spidev_initialize();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ int board_app_initialize(void)
|
|||||||
|
|
||||||
/* Get the SSP port */
|
/* Get the SSP port */
|
||||||
|
|
||||||
ssp = lpc17_sspinitialize(CONFIG_NSH_MMCSDSPIPORTNO);
|
ssp = lpc17_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
|
||||||
if (!ssp)
|
if (!ssp)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n",
|
syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n",
|
||||||
|
|||||||
@@ -93,18 +93,18 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: nucleus2g_sspinitialize
|
* Name: nucleus2g_spidev_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the Nucleus 2G.
|
* Called to configure SPI chip select GPIO pins for the Nucleus 2G.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void weak_function nucleus2g_sspinitialize(void)
|
void weak_function nucleus2g_spidev_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure the SPI-based microSD CS GPIO */
|
/* Configure the SPI-based microSD CS GPIO */
|
||||||
|
|
||||||
ssp_dumpgpio("nucleus2g_sspinitialize() Entry)");
|
ssp_dumpgpio("nucleus2g_spidev_initialize() Entry)");
|
||||||
|
|
||||||
/* SSP0 connects only to the MMC/SD slot on the Nucleus 1G board.
|
/* SSP0 connects only to the MMC/SD slot on the Nucleus 1G board.
|
||||||
* P0[15]/TXD1/SCK0/SCK MMC_CLK
|
* P0[15]/TXD1/SCK0/SCK MMC_CLK
|
||||||
@@ -126,7 +126,7 @@ void weak_function nucleus2g_sspinitialize(void)
|
|||||||
#ifdef CONFIG_LPC17_SSP1
|
#ifdef CONFIG_LPC17_SSP1
|
||||||
# warning "SSP1 chip selects not known"
|
# warning "SSP1 chip selects not known"
|
||||||
#endif
|
#endif
|
||||||
ssp_dumpgpio("nucleus2g_sspinitialize() Exit");
|
ssp_dumpgpio("nucleus2g_spidev_initialize() Exit");
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
@@ -136,7 +136,7 @@ void weak_function nucleus2g_sspinitialize(void)
|
|||||||
* The external functions, lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status
|
* The external functions, lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status
|
||||||
* must be provided by board-specific logic. They are implementations of the select
|
* 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
|
* and status methods of the SPI interface defined by struct spi_ops_s (see
|
||||||
* include/nuttx/spi/spi.h). All other methods (including lpc17_sspinitialize())
|
* include/nuttx/spi/spi.h). All other methods (including lpc17_spibus_initialize())
|
||||||
* are provided by common LPC17xx logic. To use this common SPI logic on your
|
* are provided by common LPC17xx logic. To use this common SPI logic on your
|
||||||
* board:
|
* board:
|
||||||
*
|
*
|
||||||
@@ -145,9 +145,9 @@ void weak_function nucleus2g_sspinitialize(void)
|
|||||||
* 2. Provide lpc17_ssp0/ssp1select() and lpc17_ssp0/ssp1status() functions
|
* 2. Provide lpc17_ssp0/ssp1select() and lpc17_ssp0/ssp1status() functions
|
||||||
* in your board-specific logic. These functions will perform chip selection
|
* in your board-specific logic. These functions will perform chip selection
|
||||||
* and status operations using GPIOs in the way your board is configured.
|
* and status operations using GPIOs in the way your board is configured.
|
||||||
* 3. Add a calls to lpc17_sspinitialize() in your low level application
|
* 3. Add a calls to lpc17_spibus_initialize() in your low level application
|
||||||
* initialization logic
|
* initialization logic
|
||||||
* 4. The handle returned by lpc17_sspinitialize() may then be used to bind the
|
* 4. The handle returned by lpc17_spibus_initialize() may then be used to bind the
|
||||||
* SPI driver to higher level logic (e.g., calling
|
* SPI driver to higher level logic (e.g., calling
|
||||||
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
||||||
* the SPI MMC/SD driver).
|
* the SPI MMC/SD driver).
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ int usbmsc_archinitialize(void)
|
|||||||
syslog(LOG_INFO, "Initializing SPI port %d\n",
|
syslog(LOG_INFO, "Initializing SPI port %d\n",
|
||||||
LPC17XX_MMCSDSPIPORTNO);
|
LPC17XX_MMCSDSPIPORTNO);
|
||||||
|
|
||||||
spi = lpc17_sspinitialize(LPC17XX_MMCSDSPIPORTNO);
|
spi = lpc17_spibus_initialize(LPC17XX_MMCSDSPIPORTNO);
|
||||||
if (!spi)
|
if (!spi)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n",
|
syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n",
|
||||||
|
|||||||
@@ -139,14 +139,14 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: nucleus2g_sspinitialize
|
* Name: nucleus2g_spidev_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the NUCLEUS-2G board.
|
* Called to configure SPI chip select GPIO pins for the NUCLEUS-2G board.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void weak_function nucleus2g_sspinitialize(void);
|
void weak_function nucleus2g_spidev_initialize(void);
|
||||||
|
|
||||||
void up_relayinit(void);
|
void up_relayinit(void);
|
||||||
|
|
||||||
|
|||||||
@@ -251,14 +251,14 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lpc1766stk_sspinitialize
|
* Name: lpc1766stk_spidev_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the Olimex LPC1766-STK board.
|
* Called to configure SPI chip select GPIO pins for the Olimex LPC1766-STK board.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void weak_function lpc1766stk_sspinitialize(void);
|
void weak_function lpc1766stk_spidev_initialize(void);
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
#endif /* _CONFIGS_OLIMEX_LPC1766STK_SRC_LPC1766STK_H */
|
#endif /* _CONFIGS_OLIMEX_LPC1766STK_SRC_LPC1766STK_H */
|
||||||
|
|||||||
@@ -75,13 +75,13 @@
|
|||||||
void lpc17_boardinitialize(void)
|
void lpc17_boardinitialize(void)
|
||||||
{
|
{
|
||||||
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
|
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
|
||||||
* function lpc1766stk_sspinitialize() has been brought into the link.
|
* function lpc1766stk_spidev_initialize() has been brought into the link.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1)
|
#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1)
|
||||||
if (lpc1766stk_sspinitialize)
|
if (lpc1766stk_spidev_initialize)
|
||||||
{
|
{
|
||||||
lpc1766stk_sspinitialize();
|
lpc1766stk_spidev_initialize();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
|||||||
|
|
||||||
/* Get the SSP0 port (configure as a Freescale SPI port) */
|
/* Get the SSP0 port (configure as a Freescale SPI port) */
|
||||||
|
|
||||||
spi = lpc17_sspinitialize(0);
|
spi = lpc17_spibus_initialize(0);
|
||||||
if (!spi)
|
if (!spi)
|
||||||
{
|
{
|
||||||
glldbg("Failed to initialize SSP port 0\n");
|
glldbg("Failed to initialize SSP port 0\n");
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ static int nsh_sdinitialize(void)
|
|||||||
|
|
||||||
/* Get the SSP port */
|
/* Get the SSP port */
|
||||||
|
|
||||||
ssp = lpc17_sspinitialize(CONFIG_NSH_MMCSDSPIPORTNO);
|
ssp = lpc17_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
|
||||||
if (!ssp)
|
if (!ssp)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n",
|
syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n",
|
||||||
|
|||||||
@@ -217,14 +217,14 @@ static int ssp1_cdinterrupt(int irq, FAR void *context)
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lpc1766stk_sspinitialize
|
* Name: lpc1766stk_spidev_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the LPC1766-STK.
|
* Called to configure SPI chip select GPIO pins for the LPC1766-STK.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void weak_function lpc1766stk_sspinitialize(void)
|
void weak_function lpc1766stk_spidev_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure the SSP0 chip select GPIOs. Only the Nokia LCD is connected to SSP0 */
|
/* Configure the SSP0 chip select GPIOs. Only the Nokia LCD is connected to SSP0 */
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@ void weak_function lpc1766stk_sspinitialize(void)
|
|||||||
* The external functions, lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status
|
* The external functions, lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status
|
||||||
* must be provided by board-specific logic. They are implementations of the select
|
* 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
|
* and status methods of the SPI interface defined by struct spi_ops_s (see
|
||||||
* include/nuttx/spi/spi.h). All other methods (including lpc17_sspinitialize())
|
* include/nuttx/spi/spi.h). All other methods (including lpc17_spibus_initialize())
|
||||||
* are provided by common LPC17xx logic. To use this common SPI logic on your
|
* are provided by common LPC17xx logic. To use this common SPI logic on your
|
||||||
* board:
|
* board:
|
||||||
*
|
*
|
||||||
@@ -272,9 +272,9 @@ void weak_function lpc1766stk_sspinitialize(void)
|
|||||||
* 2. Provide lpc17_ssp0/ssp1select() and lpc17_ssp0/ssp1status() functions
|
* 2. Provide lpc17_ssp0/ssp1select() and lpc17_ssp0/ssp1status() functions
|
||||||
* in your board-specific logic. These functions will perform chip selection
|
* in your board-specific logic. These functions will perform chip selection
|
||||||
* and status operations using GPIOs in the way your board is configured.
|
* and status operations using GPIOs in the way your board is configured.
|
||||||
* 3. Add a calls to lpc17_sspinitialize() in your low level application
|
* 3. Add a calls to lpc17_spibus_initialize() in your low level application
|
||||||
* initialization logic
|
* initialization logic
|
||||||
* 4. The handle returned by lpc17_sspinitialize() may then be used to bind the
|
* 4. The handle returned by lpc17_spibus_initialize() may then be used to bind the
|
||||||
* SPI driver to higher level logic (e.g., calling
|
* SPI driver to higher level logic (e.g., calling
|
||||||
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
||||||
* the SPI MMC/SD driver).
|
* the SPI MMC/SD driver).
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ int usbmsc_archinitialize(void)
|
|||||||
syslog(LOG_INFO, "Initializing SPI port %d\n",
|
syslog(LOG_INFO, "Initializing SPI port %d\n",
|
||||||
LPC17XX_MMCSDSPIPORTNO);
|
LPC17XX_MMCSDSPIPORTNO);
|
||||||
|
|
||||||
spi = lpc17_sspinitialize(LPC17XX_MMCSDSPIPORTNO);
|
spi = lpc17_spibus_initialize(LPC17XX_MMCSDSPIPORTNO);
|
||||||
if (!spi)
|
if (!spi)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n",
|
syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n",
|
||||||
|
|||||||
@@ -91,13 +91,13 @@ void lpc17_boardinitialize(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
|
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
|
||||||
* function open1788_sspinitialize() has been brought into the link.
|
* function open1788_spidev_initialize() has been brought into the link.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1) || defined(CONFIG_LPC17_SSP2)
|
#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1) || defined(CONFIG_LPC17_SSP2)
|
||||||
if (open1788_sspinitialize)
|
if (open1788_spidev_initialize)
|
||||||
{
|
{
|
||||||
open1788_sspinitialize();
|
open1788_spidev_initialize();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -100,14 +100,14 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: open1788_sspinitialize
|
* Name: open1788_spidev_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the LPC1766-STK.
|
* Called to configure SPI chip select GPIO pins for the LPC1766-STK.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void weak_function open1788_sspinitialize(void)
|
void weak_function open1788_spidev_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure the SSP0 chip select GPIOs. */
|
/* Configure the SSP0 chip select GPIOs. */
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ void weak_function open1788_sspinitialize(void)
|
|||||||
* The external functions, lpc17_ssp0/1/2select and lpc17_ssp0/1/2status
|
* The external functions, lpc17_ssp0/1/2select and lpc17_ssp0/1/2status
|
||||||
* must be provided by board-specific logic. They are implementations of the select
|
* 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
|
* and status methods of the SPI interface defined by struct spi_ops_s (see
|
||||||
* include/nuttx/spi/spi.h). All other methods (including lpc17_sspinitialize())
|
* include/nuttx/spi/spi.h). All other methods (including lpc17_spibus_initialize())
|
||||||
* are provided by common LPC17xx logic. To use this common SPI logic on your
|
* are provided by common LPC17xx logic. To use this common SPI logic on your
|
||||||
* board:
|
* board:
|
||||||
*
|
*
|
||||||
@@ -146,9 +146,9 @@ void weak_function open1788_sspinitialize(void)
|
|||||||
* 2. Provide lpc17_ssp0/1/2select() and lpc17_ssp0/1/2status() functions
|
* 2. Provide lpc17_ssp0/1/2select() and lpc17_ssp0/1/2status() functions
|
||||||
* in your board-specific logic. These functions will perform chip selection
|
* in your board-specific logic. These functions will perform chip selection
|
||||||
* and status operations using GPIOs in the way your board is configured.
|
* and status operations using GPIOs in the way your board is configured.
|
||||||
* 3. Add a calls to lpc17_sspinitialize() in your low level application
|
* 3. Add a calls to lpc17_spibus_initialize() in your low level application
|
||||||
* initialization logic
|
* initialization logic
|
||||||
* 4. The handle returned by lpc17_sspinitialize() may then be used to bind the
|
* 4. The handle returned by lpc17_spibus_initialize() may then be used to bind the
|
||||||
* SPI driver to higher level logic (e.g., calling
|
* SPI driver to higher level logic (e.g., calling
|
||||||
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
||||||
* the SPI MMC/SD driver).
|
* the SPI MMC/SD driver).
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ int board_tsc_setup(int minor)
|
|||||||
|
|
||||||
/* Get an instance of the SPI interface */
|
/* Get an instance of the SPI interface */
|
||||||
|
|
||||||
dev = lpc17_sspinitialize(CONFIG_ADS7843E_SPIDEV);
|
dev = lpc17_spibus_initialize(CONFIG_ADS7843E_SPIDEV);
|
||||||
if (!dev)
|
if (!dev)
|
||||||
{
|
{
|
||||||
idbg("Failed to initialize SPI bus %d\n", CONFIG_ADS7843E_SPIDEV);
|
idbg("Failed to initialize SPI bus %d\n", CONFIG_ADS7843E_SPIDEV);
|
||||||
|
|||||||
@@ -166,14 +166,14 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: open1788_sspinitialize
|
* Name: open1788_spidev_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the WaveShare Open1788 board.
|
* Called to configure SPI chip select GPIO pins for the WaveShare Open1788 board.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void weak_function open1788_sspinitialize(void);
|
void weak_function open1788_spidev_initialize(void);
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: open1788_sdram_initialize
|
* Name: open1788_sdram_initialize
|
||||||
|
|||||||
@@ -86,14 +86,14 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: pic32mx_sspinitialize
|
* Name: pic32mx_spidev_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the Sure PIC32MX board.
|
* Called to configure SPI chip select GPIO pins for the Sure PIC32MX board.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void weak_function pic32mx_sspinitialize(void)
|
void weak_function pic32mx_spidev_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure the SPI chip select GPIOs */
|
/* Configure the SPI chip select GPIOs */
|
||||||
|
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ void weak_function at90usb_spidev_initialize(void)
|
|||||||
* other methods (including avr_spibus_initialize()) 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:
|
* To use this common SPI logic on your board:
|
||||||
*
|
*
|
||||||
* 1. Provide logic in avr_sspinitialize() to configure SPI chip select pins.
|
* 1. Provide logic in avr_spidev_initialize() to configure SPI chip select pins.
|
||||||
* 2. Provide avr_spiselect() and avr_spistatus() functions in your board-specific
|
* 2. Provide avr_spiselect() and avr_spistatus() functions in your board-specific
|
||||||
* logic. These functions will perform chip selection and status operations
|
* logic. These functions will perform chip selection and status operations
|
||||||
* in the way your board is configured.
|
* in the way your board is configured.
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ int board_app_initialize(void)
|
|||||||
|
|
||||||
/* Get the SSP port */
|
/* Get the SSP port */
|
||||||
|
|
||||||
ssp = lpc17_sspinitialize(CONFIG_NSH_MMCSDSPIPORTNO);
|
ssp = lpc17_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
|
||||||
if (!ssp)
|
if (!ssp)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n",
|
syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n",
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ void weak_function c027_ssp_initialize(void)
|
|||||||
* The external functions, lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status
|
* The external functions, lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status
|
||||||
* must be provided by board-specific logic. They are implementations of the select
|
* 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
|
* and status methods of the SPI interface defined by struct spi_ops_s (see
|
||||||
* include/nuttx/spi/spi.h). All other methods (including lpc17_sspinitialize())
|
* include/nuttx/spi/spi.h). All other methods (including lpc17_spibus_initialize())
|
||||||
* are provided by common LPC17xx logic. To use this common SPI logic on your
|
* are provided by common LPC17xx logic. To use this common SPI logic on your
|
||||||
* board:
|
* board:
|
||||||
*
|
*
|
||||||
@@ -128,9 +128,9 @@ void weak_function c027_ssp_initialize(void)
|
|||||||
* 2. Provide lpc17_ssp0/ssp1select() and lpc17_ssp0/ssp1status() functions
|
* 2. Provide lpc17_ssp0/ssp1select() and lpc17_ssp0/ssp1status() functions
|
||||||
* in your board-specific logic. These functions will perform chip selection
|
* in your board-specific logic. These functions will perform chip selection
|
||||||
* and status operations using GPIOs in the way your board is configured.
|
* and status operations using GPIOs in the way your board is configured.
|
||||||
* 3. Add a calls to lpc17_sspinitialize() in your low level application
|
* 3. Add a calls to lpc17_spibus_initialize() in your low level application
|
||||||
* initialization logic
|
* initialization logic
|
||||||
* 4. The handle returned by lpc17_sspinitialize() may then be used to bind the
|
* 4. The handle returned by lpc17_spibus_initialize() may then be used to bind the
|
||||||
* SPI driver to higher level logic (e.g., calling
|
* SPI driver to higher level logic (e.g., calling
|
||||||
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
||||||
* the SPI MMC/SD driver).
|
* the SPI MMC/SD driver).
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ int usbmsc_archinitialize(void)
|
|||||||
|
|
||||||
syslog(LOG_INFO, "Initializing SPI port %d\n", LPC17XX_MMCSDSPIPORTNO);
|
syslog(LOG_INFO, "Initializing SPI port %d\n", LPC17XX_MMCSDSPIPORTNO);
|
||||||
|
|
||||||
spi = lpc17_sspinitialize(LPC17XX_MMCSDSPIPORTNO);
|
spi = lpc17_spibus_initialize(LPC17XX_MMCSDSPIPORTNO);
|
||||||
if (!spi)
|
if (!spi)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n",
|
syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n",
|
||||||
|
|||||||
@@ -79,13 +79,13 @@
|
|||||||
void lpc17_boardinitialize(void)
|
void lpc17_boardinitialize(void)
|
||||||
{
|
{
|
||||||
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
|
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
|
||||||
* function zkit_sspinitialize() has been brought into the link.
|
* function zkit_spidev_initialize() has been brought into the link.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1)
|
#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1)
|
||||||
if (zkit_sspinitialize)
|
if (zkit_spidev_initialize)
|
||||||
{
|
{
|
||||||
zkit_sspinitialize();
|
zkit_spidev_initialize();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -114,8 +114,8 @@ int board_lcd_initialize(void)
|
|||||||
lpc17_gpiowrite(ZKITARM_OLED_RST, 1);
|
lpc17_gpiowrite(ZKITARM_OLED_RST, 1);
|
||||||
lpc17_gpiowrite(ZKITARM_OLED_RS, 1);
|
lpc17_gpiowrite(ZKITARM_OLED_RS, 1);
|
||||||
|
|
||||||
zkit_sspinitialize();
|
zkit_spidev_initialize();
|
||||||
g_spidev = lpc17_sspinitialize(0);
|
g_spidev = lpc17_spibus_initialize(0);
|
||||||
if (!g_spidev)
|
if (!g_spidev)
|
||||||
{
|
{
|
||||||
glldbg("Failed to initialize SSP port 0\n");
|
glldbg("Failed to initialize SSP port 0\n");
|
||||||
|
|||||||
@@ -94,18 +94,18 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: zkit_sspinitialize
|
* Name: zkit_spidev_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the ZKIT-ARM-1769 Kit.
|
* Called to configure SPI chip select GPIO pins for the ZKIT-ARM-1769 Kit.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void weak_function zkit_sspinitialize(void)
|
void weak_function zkit_spidev_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure the SPI-based LCD CS GPIO */
|
/* Configure the SPI-based LCD CS GPIO */
|
||||||
|
|
||||||
ssp_dumpgpio("zkit_sspinitialize() Entry)");
|
ssp_dumpgpio("zkit_spidev_initialize() Entry)");
|
||||||
|
|
||||||
/* Configure chip select for the LCD. */
|
/* Configure chip select for the LCD. */
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ void weak_function zkit_sspinitialize(void)
|
|||||||
#endif
|
#endif
|
||||||
#endif /* CONFIG_LPC17_SSP0 */
|
#endif /* CONFIG_LPC17_SSP0 */
|
||||||
|
|
||||||
ssp_dumpgpio("zkit_sspinitialize() Exit");
|
ssp_dumpgpio("zkit_spidev_initialize() Exit");
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
@@ -125,7 +125,7 @@ void weak_function zkit_sspinitialize(void)
|
|||||||
* The external functions, lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status
|
* The external functions, lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status
|
||||||
* must be provided by board-specific logic. They are implementations of the select
|
* 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
|
* and status methods of the SPI interface defined by struct spi_ops_s (see
|
||||||
* include/nuttx/spi/spi.h). All other methods (including lpc17_sspinitialize())
|
* include/nuttx/spi/spi.h). All other methods (including lpc17_spibus_initialize())
|
||||||
* are provided by common LPC17xx logic. To use this common SPI logic on your
|
* are provided by common LPC17xx logic. To use this common SPI logic on your
|
||||||
* board:
|
* board:
|
||||||
*
|
*
|
||||||
@@ -134,9 +134,9 @@ void weak_function zkit_sspinitialize(void)
|
|||||||
* 2. Provide lpc17_ssp0/ssp1select() and lpc17_ssp0/ssp1status() functions
|
* 2. Provide lpc17_ssp0/ssp1select() and lpc17_ssp0/ssp1status() functions
|
||||||
* in your board-specific logic. These functions will perform chip selection
|
* in your board-specific logic. These functions will perform chip selection
|
||||||
* and status operations using GPIOs in the way your board is configured.
|
* and status operations using GPIOs in the way your board is configured.
|
||||||
* 3. Add a calls to lpc17_sspinitialize() in your low level application
|
* 3. Add a calls to lpc17_spibus_initialize() in your low level application
|
||||||
* initialization logic
|
* initialization logic
|
||||||
* 4. The handle returned by lpc17_sspinitialize() may then be used to bind the
|
* 4. The handle returned by lpc17_spibus_initialize() may then be used to bind the
|
||||||
* SPI driver to higher level logic (e.g., calling
|
* SPI driver to higher level logic (e.g., calling
|
||||||
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
||||||
* the SPI MMC/SD driver).
|
* the SPI MMC/SD driver).
|
||||||
|
|||||||
@@ -230,14 +230,14 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: zkit_sspinitialize
|
* Name: zkit_spidev_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SSP chip select GPIO pins for the ZKit-ARM-1769 board.
|
* Called to configure SSP chip select GPIO pins for the ZKit-ARM-1769 board.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void weak_function zkit_sspinitialize(void);
|
void weak_function zkit_spidev_initialize(void);
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: zkit_spinitialize
|
* Name: zkit_spinitialize
|
||||||
|
|||||||
Reference in New Issue
Block a user