For LK MCUs, rename up_spiinitialize to kl_spibus_initialize
This commit is contained in:
parent
d06fae98a3
commit
3b6a502eff
@ -51,6 +51,9 @@
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: efm32_spibus_initialize
|
||||
*
|
||||
@ -65,7 +68,6 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s;
|
||||
struct spi_dev_s *efm32_spibus_initialize(int port);
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/src/kl/kl_spi.c
|
||||
*
|
||||
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -622,7 +622,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *rxbuffer, size_t
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_spiinitialize
|
||||
* Name: kl_spibus_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the selected SPI port.
|
||||
@ -635,7 +635,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *rxbuffer, size_t
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct spi_dev_s *up_spiinitialize(int port)
|
||||
FAR struct spi_dev_s *kl_spibus_initialize(int port)
|
||||
{
|
||||
FAR struct kl_spidev_s *priv;
|
||||
uint32_t regval;
|
||||
|
@ -44,10 +44,6 @@
|
||||
|
||||
#if defined(CONFIG_KL_SPI0) || defined(CONFIG_KL_SPI1)
|
||||
|
||||
/************************************************************************************
|
||||
* Pre-processor Declarations
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Public Data
|
||||
************************************************************************************/
|
||||
@ -67,8 +63,11 @@ extern "C"
|
||||
* Public Function Prototypes
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: up_spiinitialize
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: kl_spibus_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the selected SPI port.
|
||||
@ -79,10 +78,9 @@ extern "C"
|
||||
* Returned Value:
|
||||
* Valid SPI device structure reference on succcess; a NULL on failure
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s;
|
||||
FAR struct spi_dev_s *up_spiinitialize(int port);
|
||||
FAR struct spi_dev_s *kl_spibus_initialize(int port);
|
||||
|
||||
/************************************************************************************
|
||||
* Name: kl_spi[n]select, kl_spi[n]status, and kl_spi[n]cmddata
|
||||
@ -91,7 +89,7 @@ FAR struct spi_dev_s *up_spiinitialize(int port);
|
||||
* These external functions must be provided by board-specific logic. They are
|
||||
* implementations of the select, status, and cmddata 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 Kinetis logic. To use
|
||||
* including kl_spibus_initialize()) are provided by common Kinetis logic. To use
|
||||
* this common SPI logic on your board:
|
||||
*
|
||||
* 1. Provide logic in kl_boardinitialize() to configure SPI chip select
|
||||
@ -103,17 +101,15 @@ FAR struct spi_dev_s *up_spiinitialize(int port);
|
||||
* kl_spi[n]cmddata() functions in your board-specific logic. These
|
||||
* functions 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 kl_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 kl_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).
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
enum spi_dev_e;
|
||||
|
||||
#ifdef CONFIG_KL_SPI0
|
||||
void kl_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t kl_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
|
@ -109,6 +109,9 @@ extern "C"
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spibus_initialize
|
||||
*
|
||||
@ -159,10 +162,6 @@ struct spi_dev_s *sam_spibus_initialize(int port);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAM34_SPI0
|
||||
struct spi_dev_s;
|
||||
enum spi_dev_e;
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spi[0|1]select
|
||||
*
|
||||
@ -250,7 +249,6 @@ int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
#endif /* CONFIG_SAM34_SPI0 */
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
|
@ -103,6 +103,9 @@ extern "C"
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spibus_initialize
|
||||
*
|
||||
@ -152,10 +155,6 @@ struct spi_dev_s *sam_spibus_initialize(int port);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
struct spi_dev_s;
|
||||
enum spi_dev_e;
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spi[0|1]select
|
||||
*
|
||||
@ -243,7 +242,6 @@ int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
#endif /* CONFIG_SAMA5_SPI0 */
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
|
@ -86,6 +86,9 @@ extern "C"
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spibus_initialize
|
||||
*
|
||||
@ -138,9 +141,6 @@ struct spi_dev_s *sam_spibus_initialize(int port);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s;
|
||||
enum spi_dev_e;
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spi[n]select
|
||||
*
|
||||
|
@ -111,6 +111,10 @@ extern "C"
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
struct spi_sctrlr_s; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spibus_initialize
|
||||
*
|
||||
@ -178,9 +182,6 @@ FAR struct spi_sctrlr_s *sam_spi_slave_initialize(int port);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spi[0|1]select
|
||||
*
|
||||
|
@ -78,6 +78,7 @@ extern "C"
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s;
|
||||
FAR struct spi_dev_s *tiva_spibus_initialize(int port);
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -398,6 +398,9 @@ void pic32mx_dumpgpio(uint32_t pinset, const char *msg);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
FAR struct spi_dev_s *pic32mx_spibus_initialize(int port);
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -70,6 +70,9 @@ extern "C"
|
||||
* Public Function Prototypes
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: pic32mz_spibus_initialize
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user