Merge branch 'spidevid'
This commit is contained in:
commit
4ca4d2395b
@ -5014,11 +5014,11 @@ int kbd_decode(FAR struct lib_instream_s *stream, FAR struct kbd_getstate_s *sta
|
||||
That structure defines a call table with the following methods:
|
||||
<ul>
|
||||
<p><code>void lock(FAR struct spi_dev_s *dev);</code></p>
|
||||
<p><code>void select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);</code><br>
|
||||
<p><code>void select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);</code><br>
|
||||
<code>uint32_t setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency);</code><br>
|
||||
<code>void setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode);</code><br>
|
||||
<code>void setbits(FAR struct spi_dev_s *dev, int nbits);</code><br>
|
||||
<code>uint8_t status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);</code><br>
|
||||
<code>uint8_t status(FAR struct spi_dev_s *dev, uint32_t devid);</code><br>
|
||||
<code>uint16_t send(FAR struct spi_dev_s *dev, uint16_t wd);</code><br>
|
||||
<code>void exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, FAR void *rxbuffer, size_t nwords);</code><br>
|
||||
<p><code>int registercallback(FAR struct spi_dev_s *dev, mediachange_t callback, void *arg);</code></p>
|
||||
|
@ -109,11 +109,11 @@ struct efm32_spiconfig_s
|
||||
|
||||
/* SPI-specific methods */
|
||||
|
||||
void (*select)(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void (*select)(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
uint8_t (*status)(struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t (*status)(struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int (*cmddata)(struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int (*cmddata)(struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -180,7 +180,7 @@ static inline void spi_dmatxstart(FAR struct efm32_spidev_s *priv);
|
||||
/* SPI methods */
|
||||
|
||||
static int spi_lock(struct spi_dev_s *dev, bool lock);
|
||||
static void spi_select(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static void spi_select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
static uint32_t spi_setfrequency(struct spi_dev_s *dev,
|
||||
uint32_t frequency);
|
||||
@ -190,9 +190,9 @@ static void spi_setbits(struct spi_dev_s *dev, int nbits);
|
||||
static int spi_hwfeatures(FAR struct spi_dev_s *dev,
|
||||
spi_hwfeatures_t features);
|
||||
#endif
|
||||
static uint8_t spi_status(struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
static uint8_t spi_status(struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static int spi_cmddata(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool cmd);
|
||||
#endif
|
||||
static uint16_t spi_send(struct spi_dev_s *dev, uint16_t wd);
|
||||
@ -781,7 +781,7 @@ static int spi_lock(struct spi_dev_s *dev, bool lock)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void spi_select(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static void spi_select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
struct efm32_spidev_s *priv = (struct efm32_spidev_s *)dev;
|
||||
@ -1147,7 +1147,7 @@ static int spi_hwfeatures(FAR struct spi_dev_s *dev, spi_hwfeatures_t features)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint8_t spi_status(struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
static uint8_t spi_status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
struct efm32_spidev_s *priv = (struct efm32_spidev_s *)dev;
|
||||
const struct efm32_spiconfig_s *config;
|
||||
@ -1185,7 +1185,7 @@ static uint8_t spi_status(struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static int spi_cmddata(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool cmd);
|
||||
{
|
||||
struct efm32_spidev_s *priv = (struct efm32_spidev_s *)dev;
|
||||
|
@ -52,7 +52,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: efm32_spibus_initialize
|
||||
@ -101,26 +100,26 @@ struct spi_dev_s *efm32_spibus_initialize(int port);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_EFM32_USART0_ISSPI
|
||||
void efm32_spi0_select(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void efm32_spi0_select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
uint8_t efm32_spi0_status(struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int efm32_spi0_cmddata(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
uint8_t efm32_spi0_status(struct spi_dev_s *dev, uint32_t devid);
|
||||
int efm32_spi0_cmddata(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_EFM32_USART1_ISSPI
|
||||
void efm32_spi1_select(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void efm32_spi1_select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
uint8_t efm32_spi1_status(struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int efm32_spi1_cmddata(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
uint8_t efm32_spi1_status(struct spi_dev_s *dev, uint32_t devid);
|
||||
int efm32_spi1_cmddata(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_EFM32_USART2_ISSPI
|
||||
void efm32_spi2_select(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void efm32_spi2_select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
uint8_t efm32_spi2_status(struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int efm32_spi2_cmddata(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
uint8_t efm32_spi2_status(struct spi_dev_s *dev, uint32_t devid);
|
||||
int efm32_spi2_cmddata(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool cmd);
|
||||
#endif
|
||||
|
||||
|
@ -178,7 +178,6 @@ extern "C"
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: imx_spibus_initialize
|
||||
@ -225,10 +224,10 @@ FAR struct spi_dev_s *imx_spibus_initialize(int port);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void imx_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t imx_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void imx_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t imx_spistatus(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int imx_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int imx_spicmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
|
@ -138,12 +138,12 @@
|
||||
/* Per SPI callouts to board-specific logic */
|
||||
|
||||
typedef CODE void (*imx_select_t)(FAR struct spi_dev_s *dev,
|
||||
enum spi_dev_e devid, bool selected);
|
||||
uint32_t devid, bool selected);
|
||||
typedef CODE uint8_t (*imx_status_t)(FAR struct spi_dev_s *dev,
|
||||
enum spi_dev_e devid);
|
||||
uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
typedef CODE int (*imx_cmddata_t)(FAR struct spi_dev_s *dev,
|
||||
enum spi_dev_e devid, bool cmd);
|
||||
uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
struct imx_spidev_s
|
||||
@ -228,16 +228,16 @@ static int spi_interrupt(int irq, void *context, FAR void *arg);
|
||||
/* SPI methods */
|
||||
|
||||
static int spi_lock(FAR struct spi_dev_s *dev, bool lock);
|
||||
static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev,
|
||||
uint32_t frequency);
|
||||
static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode);
|
||||
static void spi_setbits(FAR struct spi_dev_s *dev, int nbits);
|
||||
static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd);
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool cmd);
|
||||
#endif
|
||||
#ifdef CONFIG_SPI_EXCHANGE
|
||||
@ -835,7 +835,7 @@ static int spi_lock(FAR struct spi_dev_s *dev, bool lock)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
struct imx_spidev_s *priv = (struct imx_spidev_s *)dev;
|
||||
@ -1051,7 +1051,7 @@ static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
struct imx_spidev_s *priv = (struct imx_spidev_s *)dev;
|
||||
uint8_t ret = 0;
|
||||
@ -1091,7 +1091,7 @@ static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool cmd)
|
||||
{
|
||||
struct imx_spidev_s *priv = (struct imx_spidev_s *)dev;
|
||||
|
@ -70,7 +70,6 @@ extern "C"
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/************************************************************************************
|
||||
* Name: imx_spibus_initialize
|
||||
@ -118,42 +117,42 @@ FAR struct spi_dev_s *imx_spibus_initialize(int port);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_IMX6_ECSPI1
|
||||
void imx_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t imx_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void imx_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t imx_spi1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int imx_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int imx_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IMX6_ECSPI2
|
||||
void imx_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t imx_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void imx_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t imx_spi2status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int imx_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int imx_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IMX6_ECSPI3
|
||||
void imx_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t imx_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void imx_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t imx_spi3status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int imx_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int imx_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IMX6_ECSPI4
|
||||
void imx_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t imx_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void imx_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t imx_spi4status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int imx_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int imx_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IMX6_ECSPI5
|
||||
void imx_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t imx_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void imx_spi5select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t imx_spi5status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int imx_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int imx_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -63,8 +63,7 @@ extern "C"
|
||||
* Public Data
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s;
|
||||
enum spi_dev_e;
|
||||
struct spi_dev_s;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
@ -115,24 +114,24 @@ FAR struct spi_dev_s *kinetis_spibus_initialize(int bus);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_KINETIS_SPI0
|
||||
void kinetis_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t kinetis_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void kinetis_spi0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t kinetis_spi0status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int kinetis_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int kinetis_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_KINETIS_SPI1
|
||||
void kinetis_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t kinetis_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void kinetis_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t kinetis_spi1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int kinetis_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int kinetis_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_KINETIS_SPI2
|
||||
void kinetis_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t kinetis_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void kinetis_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t kinetis_spi2status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int kinetis_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int kinetis_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -64,7 +64,6 @@ extern "C"
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: kl_spibus_initialize
|
||||
@ -111,18 +110,18 @@ FAR struct spi_dev_s *kl_spibus_initialize(int port);
|
||||
************************************************************************************/
|
||||
|
||||
#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);
|
||||
void kl_spi0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t kl_spi0status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int kl_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int kl_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KL_SPI1
|
||||
void kl_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t kl_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void kl_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t kl_spi1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int kl_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int kl_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -112,10 +112,10 @@ FAR struct spi_dev_s *lpc11_spibus_initialize(int port);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void lpc11_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t lpc11_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void lpc11_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t lpc11_spistatus(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int lpc11_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int lpc11_spicmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -113,18 +113,18 @@ FAR struct spi_dev_s *lpc11_sspbus_initialize(int port);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LPC11_SSP0
|
||||
void lpc11_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t lpc11_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void lpc11_ssp0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t lpc11_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int lpc11_ssp0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int lpc11_ssp0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC11_SSP1
|
||||
void lpc11_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t lpc11_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void lpc11_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t lpc11_ssp1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int lpc11_ssp1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int lpc11_ssp1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -71,7 +71,6 @@ extern "C"
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/************************************************************************************
|
||||
* Name: lpc17_spibus_initialize
|
||||
@ -115,10 +114,10 @@ FAR struct spi_dev_s *lpc17_spibus_initialize(int port);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void lpc17_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t lpc17_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void lpc17_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t lpc17_spistatus(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int lpc17_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int lpc17_spicmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -113,18 +113,18 @@ FAR struct spi_dev_s *lpc17_sspbus_initialize(int port);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LPC17_SSP0
|
||||
void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void lpc17_ssp0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int lpc17_ssp0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int lpc17_ssp0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC17_SSP1
|
||||
void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void lpc17_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int lpc17_ssp1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int lpc17_ssp1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -154,7 +154,6 @@
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc23_spibus_initialize
|
||||
@ -178,7 +177,7 @@ FAR struct spi_dev_s *lpc23_spibus_initialize(int port);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void lpc23xx_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t lpc23xx_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void lpc23xx_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t lpc23xx_spistatus(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
|
||||
#endif /* __ARCH_ARM_SRC_LPC2378_LPC23XX_SPI_H */
|
||||
|
@ -185,8 +185,6 @@ void lpc31_clockconfig(void);
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
FAR struct spi_dev_s *lpc31_spibus_initialize(int port);
|
||||
|
||||
/************************************************************************************
|
||||
@ -218,10 +216,10 @@ FAR struct spi_dev_s *lpc31_spibus_initialize(int port);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void lpc31_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t lpc31_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void lpc31_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t lpc31_spistatus(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int lpc31_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int lpc31_spicmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -115,11 +115,11 @@ static inline uint16_t spi_readword(FAR struct lpc31_spidev_s *priv);
|
||||
static inline void spi_writeword(FAR struct lpc31_spidev_s *priv, uint16_t word);
|
||||
|
||||
static int spi_lock(FAR struct spi_dev_s *dev, bool lock);
|
||||
static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency);
|
||||
static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode);
|
||||
static void spi_setbits(FAR struct spi_dev_s *dev, int nbits);
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t word);
|
||||
static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
|
||||
FAR void *rxbuffer, size_t nwords);
|
||||
@ -482,7 +482,7 @@ static int spi_lock(FAR struct spi_dev_s *dev, bool lock)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
struct lpc31_spidev_s *priv = (struct lpc31_spidev_s *) dev;
|
||||
uint8_t slave = 0;
|
||||
@ -689,7 +689,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
/* FIXME: is there anyway to determine this
|
||||
* it should probably be board dependant anyway */
|
||||
|
@ -103,7 +103,7 @@ struct lpc43_spidev_s
|
||||
/* SPI methods */
|
||||
|
||||
static int spi_lock(FAR struct spi_dev_s *dev, bool lock);
|
||||
static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency);
|
||||
static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode);
|
||||
static void spi_setbits(FAR struct spi_dev_s *dev, int nbits);
|
||||
|
@ -122,11 +122,11 @@ FAR struct spi_dev_s *lpc43_spibus_initialize(int port);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void lpc43_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t lpc43_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void lpc43_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t lpc43_spistatus(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int lpc43_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int lpc43_spicmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -121,18 +121,18 @@ FAR struct spi_dev_s *lpc43_sspbus_initialize(int port);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LPC43_SSP0
|
||||
void lpc43_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t lpc43_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void lpc43_ssp0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t lpc43_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int lpc43_ssp0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int lpc43_ssp0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC43_SSP1
|
||||
void lpc43_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t lpc43_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void lpc43_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t lpc43_ssp1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int lpc43_ssp1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int lpc43_ssp1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -190,7 +190,7 @@ struct sam_spics_s
|
||||
|
||||
/* Type of board-specific SPI status function */
|
||||
|
||||
typedef void (*select_t)(enum spi_dev_e devid, bool selected);
|
||||
typedef void (*select_t)(uint32_t devid, bool selected);
|
||||
|
||||
/* Chip select register offsetrs */
|
||||
|
||||
@ -272,7 +272,7 @@ static inline uintptr_t spi_regaddr(struct sam_spics_s *spics,
|
||||
/* SPI methods */
|
||||
|
||||
static int spi_lock(struct spi_dev_s *dev, bool lock);
|
||||
static void spi_select(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static void spi_select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency);
|
||||
static void spi_setmode(struct spi_dev_s *dev, enum spi_mode_e mode);
|
||||
@ -916,7 +916,7 @@ static int spi_lock(struct spi_dev_s *dev, bool lock)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void spi_select(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static void spi_select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
struct sam_spics_s *spics = (struct sam_spics_s *)dev;
|
||||
|
@ -110,7 +110,6 @@ extern "C"
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spibus_initialize
|
||||
@ -189,10 +188,10 @@ struct spi_dev_s *sam_spibus_initialize(int port);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAM34_SPI0
|
||||
void sam_spi0select(enum spi_dev_e devid, bool selected);
|
||||
void sam_spi0select(uint32_t devid, bool selected);
|
||||
#endif
|
||||
#ifdef CONFIG_SAM34_SPI1
|
||||
void sam_spi1select(enum spi_dev_e devid, bool selected);
|
||||
void sam_spi1select(uint32_t devid, bool selected);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -211,10 +210,10 @@ void sam_spi1select(enum spi_dev_e devid, bool selected);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAM34_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#endif
|
||||
#ifdef CONFIG_SAM34_SPI1
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -243,10 +242,10 @@ uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef CONFIG_SAM34_SPI0
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#ifdef CONFIG_SAM34_SPI1
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -182,7 +182,7 @@ struct sam_spics_s
|
||||
|
||||
/* Type of board-specific SPI status fuction */
|
||||
|
||||
typedef void (*select_t)(enum spi_dev_e devid, bool selected);
|
||||
typedef void (*select_t)(uint32_t devid, bool selected);
|
||||
|
||||
/* Chip select register offsetrs */
|
||||
|
||||
@ -263,7 +263,7 @@ static inline uintptr_t spi_physregaddr(struct sam_spics_s *spics,
|
||||
/* SPI methods */
|
||||
|
||||
static int spi_lock(struct spi_dev_s *dev, bool lock);
|
||||
static void spi_select(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static void spi_select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency);
|
||||
static void spi_setmode(struct spi_dev_s *dev, enum spi_mode_e mode);
|
||||
@ -905,7 +905,7 @@ static int spi_lock(struct spi_dev_s *dev, bool lock)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void spi_select(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static void spi_select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
struct sam_spics_s *spics = (struct sam_spics_s *)dev;
|
||||
|
@ -104,7 +104,6 @@ extern "C"
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spibus_initialize
|
||||
@ -182,10 +181,10 @@ struct spi_dev_s *sam_spibus_initialize(int port);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
void sam_spi0select(enum spi_dev_e devid, bool selected);
|
||||
void sam_spi0select(uint32_t devid, bool selected);
|
||||
#endif
|
||||
#ifdef CONFIG_SAMA5_SPI1
|
||||
void sam_spi1select(enum spi_dev_e devid, bool selected);
|
||||
void sam_spi1select(uint32_t devid, bool selected);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -204,10 +203,10 @@ void sam_spi1select(enum spi_dev_e devid, bool selected);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#endif
|
||||
#ifdef CONFIG_SAMA5_SPI1
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -236,10 +235,10 @@ uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#ifdef CONFIG_SAMA5_SPI1
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -87,7 +87,6 @@ extern "C"
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spibus_initialize
|
||||
@ -168,32 +167,32 @@ struct spi_dev_s *sam_spibus_initialize(int port);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI0
|
||||
void sam_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi0select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI1
|
||||
void sam_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI2
|
||||
void sam_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi2select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI3
|
||||
void sam_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi3select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI4
|
||||
void sam_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi4select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI5
|
||||
void sam_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi5select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
#endif
|
||||
|
||||
@ -213,27 +212,27 @@ void sam_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI1
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI2
|
||||
uint8_t sam_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t sam_spi2status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI3
|
||||
uint8_t sam_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t sam_spi3status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI4
|
||||
uint8_t sam_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t sam_spi4status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI5
|
||||
uint8_t sam_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t sam_spi5status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -262,27 +261,27 @@ uint8_t sam_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef SAMDL_HAVE_SPI0
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI1
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI2
|
||||
int sam_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int sam_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI3
|
||||
int sam_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int sam_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI4
|
||||
int sam_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int sam_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI5
|
||||
int sam_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int sam_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -181,7 +181,7 @@ struct sam_spics_s
|
||||
|
||||
/* Type of board-specific SPI status function */
|
||||
|
||||
typedef void (*select_t)(enum spi_dev_e devid, bool selected);
|
||||
typedef void (*select_t)(uint32_t devid, bool selected);
|
||||
|
||||
/* Chip select register offsets */
|
||||
|
||||
@ -263,7 +263,7 @@ static inline uintptr_t spi_regaddr(struct sam_spics_s *spics,
|
||||
/* SPI master methods */
|
||||
|
||||
static int spi_lock(struct spi_dev_s *dev, bool lock);
|
||||
static void spi_select(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static void spi_select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency);
|
||||
#ifdef CONFIG_SPI_CS_DELAY_CONTROL
|
||||
@ -943,7 +943,7 @@ static int spi_lock(struct spi_dev_s *dev, bool lock)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void spi_select(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static void spi_select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
struct sam_spics_s *spics = (struct sam_spics_s *)dev;
|
||||
|
@ -158,7 +158,6 @@ extern "C"
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
struct spi_sctrlr_s; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
@ -255,10 +254,10 @@ FAR struct spi_sctrlr_s *sam_spi_slave_initialize(int port);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMV7_SPI0_MASTER
|
||||
void sam_spi0select(enum spi_dev_e devid, bool selected);
|
||||
void sam_spi0select(uint32_t devid, bool selected);
|
||||
#endif
|
||||
#ifdef CONFIG_SAMV7_SPI1_MASTER
|
||||
void sam_spi1select(enum spi_dev_e devid, bool selected);
|
||||
void sam_spi1select(uint32_t devid, bool selected);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -277,10 +276,10 @@ void sam_spi1select(enum spi_dev_e devid, bool selected);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMV7_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#endif
|
||||
#ifdef CONFIG_SAMV7_SPI1
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -309,10 +308,10 @@ uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef CONFIG_SAMV7_SPI0_MASTER
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#ifdef CONFIG_SAMV7_SPI1_MASTER
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif /* CONFIG_SPI_CMDDATA */
|
||||
|
||||
|
@ -64,8 +64,7 @@ extern "C"
|
||||
* Public Data
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s;
|
||||
enum spi_dev_e;
|
||||
struct spi_dev_s;
|
||||
|
||||
/************************************************************************************
|
||||
* Public Functions
|
||||
@ -117,39 +116,39 @@ FAR struct spi_dev_s *stm32_spibus_initialize(int bus);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI4
|
||||
void stm32_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int stm32_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void stm32_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int stm32_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI5
|
||||
void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int stm32_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void stm32_spi5select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int stm32_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI6
|
||||
void stm32_spi6select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t stm32_spi6status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int stm32_spi6cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void stm32_spi6select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t stm32_spi6status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int stm32_spi6cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -63,8 +63,7 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_spibus_initialize
|
||||
@ -112,39 +111,39 @@ FAR struct spi_dev_s *stm32_spibus_initialize(int bus);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32F7_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F7_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F7_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F7_SPI4
|
||||
void stm32_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int stm32_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void stm32_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int stm32_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F7_SPI5
|
||||
void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int stm32_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void stm32_spi5select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int stm32_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F7_SPI6
|
||||
void stm32_spi6select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t stm32_spi6status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int stm32_spi6cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void stm32_spi6select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t stm32_spi6status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int stm32_spi6cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -64,8 +64,7 @@ extern "C"
|
||||
* Public Data
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s;
|
||||
enum spi_dev_e;
|
||||
struct spi_dev_s;
|
||||
|
||||
/************************************************************************************
|
||||
* Public Functions
|
||||
@ -117,21 +116,21 @@ FAR struct spi_dev_s *stm32l4_spibus_initialize(int bus);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32L4_SPI1
|
||||
void stm32l4_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t stm32l4_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int stm32l4_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void stm32l4_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t stm32l4_spi1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int stm32l4_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32L4_SPI2
|
||||
void stm32l4_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t stm32l4_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int stm32l4_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void stm32l4_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t stm32l4_spi2status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int stm32l4_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32L4_SPI3
|
||||
void stm32l4_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t stm32l4_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int stm32l4_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void stm32l4_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t stm32l4_spi3status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int stm32l4_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -108,11 +108,10 @@ FAR struct spi_dev_s *tiva_ssibus_initialize(int port);
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s;
|
||||
enum spi_dev_e;
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int tiva_ssicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int tiva_ssicmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
@ -63,8 +63,7 @@ extern "C"
|
||||
* Public Data
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s;
|
||||
enum spi_dev_e;
|
||||
struct spi_dev_s;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
@ -115,24 +114,24 @@ FAR struct spi_dev_s *xmc4_spibus_initialize(int bus);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_XMC4_SPI0
|
||||
void xmc4_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t xmc4_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void xmc4_spi0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t xmc4_spi0status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int xmc4_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int xmc4_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_XMC4_SPI1
|
||||
void xmc4_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t xmc4_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void xmc4_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t xmc4_spi1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int xmc4_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int xmc4_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_XMC4_SPI2
|
||||
void xmc4_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t xmc4_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void xmc4_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t xmc4_spi2status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int xmc4_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int xmc4_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -95,6 +95,8 @@ extern uint16_t g_idle_topstack;
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
struct spi_dev_s; /* Forward references */
|
||||
|
||||
/************************************************************************************
|
||||
* Name: up_copystate
|
||||
*
|
||||
@ -150,9 +152,6 @@ uint8_t *up_doirq(uint8_t irq, uint8_t *regs);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward references */
|
||||
enum spi_dev_e; /* Forward references */
|
||||
|
||||
FAR struct spi_dev_s *avr_spibus_initialize(int port);
|
||||
|
||||
/************************************************************************************
|
||||
@ -183,10 +182,10 @@ FAR struct spi_dev_s *avr_spibus_initialize(int port);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_AVR_SPI
|
||||
void avr_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t avr_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void avr_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t avr_spistatus(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int avr_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int avr_spicmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -338,8 +338,6 @@ int hcs12_ethinitialize(int intf);
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
FAR struct spi_dev_s *hcs12_spibus_initialize(int port);
|
||||
|
||||
/************************************************************************************
|
||||
@ -367,8 +365,8 @@ FAR struct spi_dev_s *hcs12_spibus_initialize(int port);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void hcs12_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t hcs12_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void hcs12_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t hcs12_spistatus(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
|
@ -400,8 +400,6 @@ 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);
|
||||
|
||||
/************************************************************************************
|
||||
@ -433,38 +431,38 @@ FAR struct spi_dev_s *pic32mx_spibus_initialize(int port);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_PIC32MX_SPI1
|
||||
void pic32mx_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void pic32mx_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
uint8_t pic32mx_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t pic32mx_spi1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mx_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int pic32mx_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MX_SPI2
|
||||
void pic32mx_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void pic32mx_spi2select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
uint8_t pic32mx_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t pic32mx_spi2status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mx_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int pic32mx_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MX_SPI3
|
||||
void pic32mx_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void pic32mx_spi3select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
uint8_t pic32mx_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t pic32mx_spi3status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mx_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int pic32mx_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MX_SPI3
|
||||
void pic32mx_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void pic32mx_spi3select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
uint8_t pic32mx_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t pic32mx_spi3status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mx_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int pic32mx_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -71,7 +71,6 @@ extern "C"
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: pic32mz_spibus_initialize
|
||||
@ -118,56 +117,56 @@ FAR struct spi_dev_s *pic32mz_spibus_initialize(int port);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_PIC32MZ_SPI1
|
||||
void pic32mz_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void pic32mz_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
uint8_t pic32mz_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t pic32mz_spi1status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mz_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int pic32mz_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MZ_SPI2
|
||||
void pic32mz_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void pic32mz_spi2select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
uint8_t pic32mz_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t pic32mz_spi2status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mz_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int pic32mz_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MZ_SPI3
|
||||
void pic32mz_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void pic32mz_spi3select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
uint8_t pic32mz_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t pic32mz_spi3status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mz_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int pic32mz_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MZ_SPI4
|
||||
void pic32mz_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void pic32mz_spi4select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
uint8_t pic32mz_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t pic32mz_spi4status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mz_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int pic32mz_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MZ_SPI5
|
||||
void pic32mz_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void pic32mz_spi5select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
uint8_t pic32mz_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t pic32mz_spi5status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mz_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int pic32mz_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MZ_SPI6
|
||||
void pic32mz_spi6select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void pic32mz_spi6select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
uint8_t pic32mz_spi6status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t pic32mz_spi6status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mz_spi6cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int pic32mz_spi6cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -200,11 +200,11 @@ static void spiflash_setbits(FAR struct spi_dev_s *dev, int nbits);
|
||||
static uint16_t spiflash_send(FAR struct spi_dev_s *dev, uint16_t wd);
|
||||
static void spiflash_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
|
||||
FAR void *rxbuffer, size_t nwords);
|
||||
static void spiflash_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static void spiflash_select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected);
|
||||
static uint8_t spiflash_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
static uint8_t spiflash_status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spiflash_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
static int spiflash_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#ifndef CONFIG_SPI_EXCHANGE
|
||||
static void spiflash_sndblock(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
|
||||
@ -357,7 +357,7 @@ static int spiflash_lock(FAR struct spi_dev_s *dev, bool lock)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
static void spiflash_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
static void spiflash_select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
FAR struct sim_spiflashdev_s *priv = (FAR struct sim_spiflashdev_s *)dev;
|
||||
@ -392,7 +392,7 @@ static void spiflash_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spiflash_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
static int spiflash_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -467,7 +467,7 @@ static void spiflash_setbits(FAR struct spi_dev_s *dev, int nbits)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
static uint8_t spiflash_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
static uint8_t spiflash_status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -83,6 +83,8 @@ extern "C"
|
||||
* Public Function Prototypes
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
|
||||
/************************************************************************************
|
||||
* Name: i486_clockconfig
|
||||
*
|
||||
@ -207,9 +209,6 @@ int i486_dumpgpio(uint16_t pinset, const char *msg);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
FAR struct spi_dev_s *i486_spibus_initialize(int port);
|
||||
|
||||
/************************************************************************************
|
||||
@ -241,14 +240,11 @@ FAR struct spi_dev_s *i486_spibus_initialize(int port);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s;
|
||||
enum spi_dev_e;
|
||||
|
||||
#ifdef CONFIG_I486_SPI
|
||||
void i486_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t i486_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
void i486_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t i486_spistatus(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int i486_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int i486_spicmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -268,7 +264,6 @@ int i486_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s;
|
||||
#ifdef CONFIG_I486_SPI
|
||||
void spi_flush(FAR struct spi_dev_s *dev);
|
||||
#endif
|
||||
|
@ -677,7 +677,6 @@ void z16f_reset(void);
|
||||
#ifdef CONFIG_Z16F_ESPI
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
|
||||
/* Initialize the selected SPI port */
|
||||
|
||||
@ -685,16 +684,16 @@ FAR struct spi_dev_s *z16_spibus_initialize(int port);
|
||||
|
||||
/* Select an SPI device (see include/nuttx/spi/spi.h) */
|
||||
|
||||
void z16f_espi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
void z16f_espi_select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
|
||||
/* Provide SPI device status (see include/nuttx/spi/spi.h) */
|
||||
|
||||
uint8_t z16f_espi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t z16f_espi_status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
|
||||
/* Select CMD/DATA options (often used with LCD devices) */
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int z16f_espi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int z16f_espi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -145,9 +145,9 @@ FAR struct spi_dev_s *ez80_spibus_initialize(int port);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void ez80_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
uint8_t ez80_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
int ez80_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
void ez80_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
uint8_t ez80_spistatus(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
int ez80_spicmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
|
@ -109,11 +109,11 @@
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
static void spi_select(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid,
|
||||
static void spi_select(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool selected);
|
||||
static uint8_t spi_status(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid);
|
||||
static uint8_t spi_status(FAR struct spi_bitbang_s *priv, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid,
|
||||
static int spi_cmddata(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool cmd);
|
||||
#endif
|
||||
|
||||
@ -142,7 +142,7 @@ static int spi_cmddata(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void spi_select(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid,
|
||||
static void spi_select(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
if (devid == SPIDEV_MMCSD)
|
||||
@ -173,7 +173,7 @@ static void spi_select(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint8_t spi_status(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid)
|
||||
static uint8_t spi_status(FAR struct spi_bitbang_s *priv, uint32_t devid)
|
||||
{
|
||||
if (devid == SPIDEV_MMCSD)
|
||||
{
|
||||
@ -200,7 +200,7 @@ static uint8_t spi_status(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid,
|
||||
static int spi_cmddata(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool cmd)
|
||||
{
|
||||
return OK;
|
||||
|
@ -121,11 +121,11 @@
|
||||
****************************************************************************/
|
||||
/* Lower-half SPI */
|
||||
|
||||
static void spi_select(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid,
|
||||
static void spi_select(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool selected);
|
||||
static uint8_t spi_status(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid);
|
||||
static uint8_t spi_status(FAR struct spi_bitbang_s *priv, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid,
|
||||
static int spi_cmddata(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool cmd);
|
||||
#endif
|
||||
|
||||
@ -198,7 +198,7 @@ static struct ads7843e_config_s g_tscinfo =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void spi_select(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid,
|
||||
static void spi_select(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
/* The touchscreen controller is always selected */
|
||||
@ -219,7 +219,7 @@ static void spi_select(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint8_t spi_status(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid)
|
||||
static uint8_t spi_status(FAR struct spi_bitbang_s *priv, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -241,7 +241,7 @@ static uint8_t spi_status(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(FAR struct spi_bitbang_s *priv, enum spi_dev_e devid,
|
||||
static int spi_cmddata(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool cmd)
|
||||
{
|
||||
return OK;
|
||||
|
@ -107,32 +107,32 @@ void weak_function stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
/* To be provided */
|
||||
}
|
||||
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -149,7 +149,7 @@ void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -180,14 +180,14 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
/* To be provided */
|
||||
|
||||
@ -196,7 +196,7 @@ int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
/* To be provided */
|
||||
|
||||
|
@ -113,7 +113,7 @@ void weak_function stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -127,7 +127,7 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
|
||||
return SPI_STATUS_PRESENT;
|
||||
@ -135,13 +135,13 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
}
|
||||
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -91,11 +91,11 @@ void weak_function hcs12_spidev_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void hcs12_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void hcs12_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
}
|
||||
|
||||
uint8_t hcs12_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t hcs12_spistatus(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
|
@ -102,14 +102,14 @@ void weak_function tm4c_ssidev_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
ssi_dumpgpio("tiva_ssiselect() Entry");
|
||||
ssi_dumpgpio("tiva_ssiselect() Exit");
|
||||
}
|
||||
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning SPI_STATUS_PRESENT\n");
|
||||
return SPI_STATUS_PRESENT;
|
||||
|
@ -99,13 +99,13 @@ void weak_function lpc31_spidev_intialize(void)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void lpc31_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void lpc31_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t lpc31_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t lpc31_spistatus(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
|
@ -99,13 +99,13 @@ void weak_function lpc31_spidev_intialize(void)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void lpc31_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void lpc31_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t lpc31_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t lpc31_spistatus(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ void weak_function lm_ssidev_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
if (devid == SPIDEV_MMCSD)
|
||||
@ -120,7 +120,7 @@ void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool select
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning SPI_STATUS_PRESENT\n");
|
||||
return SPI_STATUS_PRESENT;
|
||||
|
@ -107,7 +107,7 @@ void weak_function lm_ssidev_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
ssi_dumpgpio("tiva_ssiselect() Entry");
|
||||
@ -128,7 +128,7 @@ void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool select
|
||||
ssi_dumpgpio("tiva_ssiselect() Exit");
|
||||
}
|
||||
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning SPI_STATUS_PRESENT\n");
|
||||
return SPI_STATUS_PRESENT;
|
||||
|
@ -131,7 +131,7 @@ void weak_function stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -161,14 +161,14 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -180,7 +180,7 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
|
@ -100,13 +100,13 @@ void weak_function k64_spidev_initialize(void)
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_KINETIS_SPI0
|
||||
void kinetis_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void kinetis_spi0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
# warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t kinetis_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t kinetis_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
# warning "Missing logic"
|
||||
return SPI_STATUS_PRESENT;
|
||||
@ -114,13 +114,13 @@ uint8_t kinetis_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KINETIS_SPI1
|
||||
void kinetis_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void kinetis_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
# warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t kinetis_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t kinetis_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
# warning "Missing logic"
|
||||
return SPI_STATUS_PRESENT;
|
||||
@ -128,13 +128,13 @@ uint8_t kinetis_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KINETIS_SPI2
|
||||
void kinetis_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void kinetis_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
# warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t kinetis_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t kinetis_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
# warning "Missing logic"
|
||||
return SPI_STATUS_PRESENT;
|
||||
|
@ -101,13 +101,13 @@ void weak_function k66_spidev_initialize(void)
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_KINETIS_SPI0
|
||||
void kinetis_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void kinetis_spi0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
# warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t kinetis_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t kinetis_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
# warning "Missing logic"
|
||||
return SPI_STATUS_PRESENT;
|
||||
@ -115,13 +115,13 @@ uint8_t kinetis_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KINETIS_SPI1
|
||||
void kinetis_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void kinetis_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
# warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t kinetis_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t kinetis_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
# warning "Missing logic"
|
||||
return SPI_STATUS_PRESENT;
|
||||
@ -129,13 +129,13 @@ uint8_t kinetis_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KINETIS_SPI2
|
||||
void kinetis_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void kinetis_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
# warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t kinetis_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t kinetis_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
# warning "Missing logic"
|
||||
return SPI_STATUS_PRESENT;
|
||||
|
@ -139,7 +139,7 @@ void weak_function kl_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_KL_SPI0
|
||||
void kl_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void kl_spi0select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n",
|
||||
@ -165,7 +165,7 @@ void kl_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KL_SPI1
|
||||
void kl_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void kl_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n",
|
||||
@ -188,14 +188,14 @@ void kl_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_KL_SPI0
|
||||
uint8_t kl_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t kl_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KL_SPI1
|
||||
uint8_t kl_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t kl_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -220,14 +220,14 @@ uint8_t kl_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef CONFIG_KL_SPI0
|
||||
int kl_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int kl_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KL_SPI1
|
||||
int kl_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int kl_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ void weak_function kl_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_KL_SPI0
|
||||
void kl_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void kl_spi0select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n",
|
||||
@ -139,7 +139,7 @@ void kl_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KL_SPI1
|
||||
void kl_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void kl_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n",
|
||||
@ -162,14 +162,14 @@ void kl_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_KL_SPI0
|
||||
uint8_t kl_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t kl_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KL_SPI1
|
||||
uint8_t kl_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t kl_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -194,14 +194,14 @@ uint8_t kl_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef CONFIG_KL_SPI0
|
||||
int kl_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int kl_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KL_SPI1
|
||||
int kl_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int kl_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ void stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -119,31 +119,31 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
|
@ -97,13 +97,13 @@ void weak_function kinetis_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_KINETIS_SPI0
|
||||
void kinetis_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void kinetis_spi0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
# warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t kinetis_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t kinetis_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
# warning "Missing logic"
|
||||
return SPI_STATUS_PRESENT;
|
||||
@ -111,13 +111,13 @@ uint8_t kinetis_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KINETIS_SPI1
|
||||
void kinetis_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void kinetis_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
# warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t kinetis_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t kinetis_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
# warning "Missing logic"
|
||||
return SPI_STATUS_PRESENT;
|
||||
@ -125,13 +125,13 @@ uint8_t kinetis_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KINETIS_SPI2
|
||||
void kinetis_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void kinetis_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
# warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t kinetis_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t kinetis_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
# warning "Missing logic"
|
||||
return SPI_STATUS_PRESENT;
|
||||
|
@ -105,7 +105,7 @@ void weak_function lm_ssidev_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
ssi_dumpgpio("tiva_ssiselect() Entry");
|
||||
@ -120,7 +120,7 @@ void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool select
|
||||
ssi_dumpgpio("tiva_ssiselect() Exit");
|
||||
}
|
||||
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning SPI_STATUS_PRESENT\n");
|
||||
return SPI_STATUS_PRESENT;
|
||||
|
@ -162,7 +162,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int tiva_ssicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int tiva_ssicmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
if (devid == SPIDEV_DISPLAY)
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ void weak_function lm_ssidev_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
ssi_dumpgpio("tiva_ssiselect() Entry");
|
||||
@ -132,7 +132,7 @@ void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool select
|
||||
ssi_dumpgpio("tiva_ssiselect() Exit");
|
||||
}
|
||||
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning SPI_STATUS_PRESENT\n");
|
||||
return SPI_STATUS_PRESENT;
|
||||
|
@ -160,7 +160,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int tiva_ssicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int tiva_ssicmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
if (devid == SPIDEV_DISPLAY)
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ void weak_function lm_ssidev_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
ssi_dumpgpio("tiva_ssiselect() Entry");
|
||||
@ -132,7 +132,7 @@ void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool select
|
||||
ssi_dumpgpio("tiva_ssiselect() Exit");
|
||||
}
|
||||
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning SPI_STATUS_PRESENT\n");
|
||||
return SPI_STATUS_PRESENT;
|
||||
|
@ -103,14 +103,14 @@ void weak_function lm4f_spidev_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void tiva_ssiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
ssi_dumpgpio("tiva_ssiselect() Entry");
|
||||
ssi_dumpgpio("tiva_ssiselect() Exit");
|
||||
}
|
||||
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning SPI_STATUS_PRESENT\n");
|
||||
return SPI_STATUS_PRESENT;
|
||||
|
@ -130,7 +130,7 @@ void weak_function lpcxpresso_sspdev_initialize(void)
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LPC17_SSP0
|
||||
void lpc11_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void lpc11_ssp0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
ssp_dumpgpio("lpc11_ssp0select() Entry");
|
||||
@ -140,7 +140,7 @@ void lpc11_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
|
||||
ssp_dumpgpio("lpc11_ssp0select() Exit");
|
||||
}
|
||||
|
||||
uint8_t lpc11_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t lpc11_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning SPI_STATUS_PRESENT\n");
|
||||
return SPI_STATUS_PRESENT;
|
||||
@ -148,7 +148,7 @@ uint8_t lpc11_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC17_SSP1
|
||||
void lpc11_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void lpc11_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
ssp_dumpgpio("lpc11_ssp1select() Entry");
|
||||
@ -170,7 +170,7 @@ void lpc11_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
|
||||
ssp_dumpgpio("lpc11_ssp1select() Exit");
|
||||
}
|
||||
|
||||
uint8_t lpc11_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t lpc11_ssp1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
if (devid == SPIDEV_MMCSD)
|
||||
{
|
||||
|
@ -159,7 +159,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int lpc17_ssp1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int lpc17_ssp1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
if (devid == SPIDEV_DISPLAY)
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ void weak_function lpcxpresso_sspdev_initialize(void)
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LPC17_SSP0
|
||||
void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void lpc17_ssp0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
ssp_dumpgpio("lpc17_ssp0select() Entry");
|
||||
@ -140,7 +140,7 @@ void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
|
||||
ssp_dumpgpio("lpc17_ssp0select() Exit");
|
||||
}
|
||||
|
||||
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning SPI_STATUS_PRESENT\n");
|
||||
return SPI_STATUS_PRESENT;
|
||||
@ -148,7 +148,7 @@ uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC17_SSP1
|
||||
void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void lpc17_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
ssp_dumpgpio("lpc17_ssp1select() Entry");
|
||||
@ -170,7 +170,7 @@ void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
|
||||
ssp_dumpgpio("lpc17_ssp1select() Exit");
|
||||
}
|
||||
|
||||
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
if (devid == SPIDEV_MMCSD)
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ void weak_function stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
@ -117,29 +117,29 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
# endif
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
@ -108,11 +108,11 @@
|
||||
****************************************************************************/
|
||||
|
||||
static int spi_lock(FAR struct spi_dev_s *dev, bool lock);
|
||||
static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency);
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t ch);
|
||||
static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size_t nwords);
|
||||
@ -210,7 +210,7 @@ static int spi_lock(FAR struct spi_dev_s *dev, bool lock)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
uint32_t bit = 1 << 20;
|
||||
|
||||
@ -301,7 +301,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
/* I don't think there is anyway to determine these things on the mcu123.com
|
||||
* board.
|
||||
@ -336,7 +336,7 @@ static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
# error "spi_cmddata not implemented"
|
||||
return -ENOSYS;
|
||||
|
@ -121,7 +121,7 @@ void weak_function stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
@ -162,7 +162,7 @@ void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -183,24 +183,24 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -231,21 +231,21 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
@ -154,9 +154,8 @@ void weak_function pic32mx_spi2initialize(void)
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s;
|
||||
enum spi_dev_e;
|
||||
|
||||
void pic32mx_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void pic32mx_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -170,13 +169,13 @@ void pic32mx_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool s
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t pic32mx_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t pic32mx_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mx_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int pic32mx_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -91,11 +91,11 @@ void weak_function hcs12_spidev_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void hcs12_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void hcs12_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
}
|
||||
|
||||
uint8_t hcs12_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t hcs12_spistatus(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
|
@ -213,39 +213,39 @@ void weak_function stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32F7_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
stm32_gpiowrite(g_spigpio[devid], !selected);
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F7_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
stm32_gpiowrite(g_spigpio[devid], !selected);
|
||||
}
|
||||
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F7_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
stm32_gpiowrite(g_spigpio[devid], !selected);
|
||||
}
|
||||
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -256,13 +256,13 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
# error "NUCLEO_SPI_BUS4_CSn Are not defined"
|
||||
# endif
|
||||
|
||||
void stm32_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
stm32_gpiowrite(g_spigpio[devid], !selected);
|
||||
}
|
||||
|
||||
uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -273,13 +273,13 @@ uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
# error "NUCLEO_SPI_BUS4_CSn Are not defined"
|
||||
# endif
|
||||
|
||||
void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi5select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
stm32_gpiowrite(g_spigpio[devid], !selected);
|
||||
}
|
||||
|
||||
uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -289,13 +289,13 @@ uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
# ifndef NUCLEO_SPI_BUS6_CS
|
||||
# error "NUCLEO_SPI_BUS4_CSn Are not defined"
|
||||
# endif
|
||||
void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi5select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
stm32_gpiowrite(g_spigpio[devid], !selected);
|
||||
}
|
||||
|
||||
uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -326,43 +326,44 @@ uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef CONFIG_STM32F7_SPI1
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F7_SPI2
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F7_SPI3
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F7_SPI4
|
||||
int stm32_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F7_SPI5
|
||||
int stm32_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F7_SPI6
|
||||
int stm32_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
:qa
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
@ -103,7 +103,7 @@ void weak_function stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
@ -116,33 +116,33 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -172,7 +172,7 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_LCD_SSD1351
|
||||
@ -188,7 +188,7 @@ int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool cmd)
|
||||
{
|
||||
return -ENODEV;
|
||||
@ -196,7 +196,7 @@ int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool cmd)
|
||||
{
|
||||
return -ENODEV;
|
||||
|
@ -141,7 +141,7 @@ void weak_function stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -160,14 +160,14 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -179,19 +179,19 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -222,21 +222,21 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ void weak_function stm32l4_spiinitialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32L4_SPI1
|
||||
void stm32l4_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32l4_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -160,14 +160,14 @@ void stm32l4_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool se
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t stm32l4_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32l4_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32L4_SPI2
|
||||
void stm32l4_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32l4_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -179,19 +179,19 @@ void stm32l4_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool se
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t stm32l4_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32l4_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32L4_SPI3
|
||||
void stm32l4_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32l4_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32l4_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32l4_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -222,21 +222,21 @@ uint8_t stm32l4_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef CONFIG_STM32L4_SPI1
|
||||
int stm32l4_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32l4_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32L4_SPI2
|
||||
int stm32l4_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32l4_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32L4_SPI3
|
||||
int stm32l4_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32l4_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
@ -99,13 +99,13 @@ void weak_function lpc31_spidev_intialize(void)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void lpc31_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void lpc31_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t lpc31_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t lpc31_spistatus(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ void weak_function lpc1766stk_sspdev_initialize(void)
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LPC17_SSP0
|
||||
void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void lpc17_ssp0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
if (devid == SPIDEV_DISPLAY)
|
||||
@ -276,7 +276,7 @@ void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
return 0;
|
||||
@ -284,7 +284,7 @@ uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC17_SSP1
|
||||
void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void lpc17_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
if (devid == SPIDEV_MMCSD)
|
||||
@ -297,7 +297,7 @@ void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning SPI_STATUS_PRESENT\n");
|
||||
return SPI_STATUS_PRESENT;
|
||||
|
@ -108,7 +108,7 @@ void weak_function stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -120,7 +120,7 @@ void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
|
@ -400,11 +400,11 @@ static inline void spi_drain(FAR struct str71x_spidev_s *priv);
|
||||
/* SPI methods */
|
||||
|
||||
static int spi_lock(FAR struct spi_dev_s *dev, bool lock);
|
||||
static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
|
||||
static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency);
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
|
||||
#endif
|
||||
static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd);
|
||||
static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size_t buflen);
|
||||
@ -608,7 +608,7 @@ static int spi_lock(FAR struct spi_dev_s *dev, bool lock)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
FAR struct str71x_spidev_s *priv = (FAR struct str71x_spidev_s *)dev;
|
||||
uint16_t reg16;
|
||||
@ -713,7 +713,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
uint16_t reg16 = getreg16(STR71X_GPIO1_PD);
|
||||
@ -756,7 +756,7 @@ static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
# error "spi_cmddata not implemented"
|
||||
return -ENOSYS;
|
||||
|
@ -107,7 +107,7 @@ void weak_function stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
if (devid == SPIDEV_USER)
|
||||
@ -116,14 +116,14 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#if defined(CONFIG_MMCSD)
|
||||
@ -134,7 +134,7 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
/* No switch on SD card socket so assume it is here */
|
||||
|
||||
@ -143,12 +143,12 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -179,21 +179,21 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
@ -130,12 +130,12 @@ void weak_function open1788_sspdev_initialize(void)
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LPC17_SSP0
|
||||
void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void lpc17_ssp0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
return 0;
|
||||
@ -143,7 +143,7 @@ uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC17_SSP1
|
||||
void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void lpc17_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
if (devid == SPIDEV_TOUCHSCREEN)
|
||||
@ -156,7 +156,7 @@ void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
return 0;
|
||||
@ -164,12 +164,12 @@ uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC17_SSP2
|
||||
void lpc17_ssp2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void lpc17_ssp2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t lpc17_ssp2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t lpc17_ssp2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
return 0;
|
||||
|
@ -102,23 +102,22 @@ void weak_function pic32mx_spidev_initialize(void)
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s;
|
||||
enum spi_dev_e;
|
||||
|
||||
#ifdef CONFIG_PIC32MX_SPI1
|
||||
void pic32mx_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void pic32mx_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t pic32mx_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t pic32mx_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
}
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mx_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int pic32mx_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
@ -127,20 +126,20 @@ int pic32mx_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MX_SPI1
|
||||
void pic32mx_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void pic32mx_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t pic32mx_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t pic32mx_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
}
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mx_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int pic32mx_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
@ -149,20 +148,20 @@ int pic32mx_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MX_SPI3
|
||||
void pic32mx_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void pic32mx_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t pic32mx_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t pic32mx_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
}
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mx_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int pic32mx_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
@ -171,20 +170,20 @@ int pic32mx_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MX_SPI4
|
||||
void pic32mx_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void pic32mx_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t pic32mx_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t pic32mx_spi4status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
}
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mx_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int pic32mx_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
|
@ -128,10 +128,9 @@ void weak_function pic32mx_spidev_initialize(void)
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s;
|
||||
enum spi_dev_e;
|
||||
|
||||
#ifdef CONFIG_PIC32MX_SPI1
|
||||
void pic32mx_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void pic32mx_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -141,7 +140,7 @@ void pic32mx_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool s
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t pic32mx_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t pic32mx_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -166,7 +165,7 @@ uint8_t pic32mx_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
return ret;
|
||||
}
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mx_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int pic32mx_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
@ -175,13 +174,13 @@ int pic32mx_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MX_SPI2
|
||||
void pic31mx_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void pic31mx_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t pic31mx_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t pic31mx_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
#warning "Missing logic"
|
||||
@ -189,7 +188,7 @@ uint8_t pic31mx_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic31mx_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int pic31mx_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
@ -198,13 +197,13 @@ int pic31mx_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MX_SPI3
|
||||
void pic32mx_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void pic32mx_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t pic32mx_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t pic32mx_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
#warning "Missing logic"
|
||||
@ -212,7 +211,7 @@ uint8_t pic32mx_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mx_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int pic32mx_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
@ -221,13 +220,13 @@ int pic32mx_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MX_SPI4
|
||||
void pic32mx_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void pic32mx_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t pic32mx_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t pic32mx_spi4status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
#warning "Missing logic"
|
||||
@ -235,7 +234,7 @@ uint8_t pic32mx_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mx_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int pic32mx_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
|
@ -100,23 +100,22 @@ void weak_function pic32mz_spidev_initialize(void)
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s;
|
||||
enum spi_dev_e;
|
||||
|
||||
#ifdef CONFIG_PIC32MZ_SPI1
|
||||
void pic32mz_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void pic32mz_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t pic32mz_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t pic32mz_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
}
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mz_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int pic32mz_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
@ -125,20 +124,20 @@ int pic32mz_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MZ_SPI2
|
||||
void pic32mz_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void pic32mz_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t pic32mz_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t pic32mz_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
}
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mz_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int pic32mz_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
@ -147,20 +146,20 @@ int pic32mz_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MZ_SPI3
|
||||
void pic32mz_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void pic32mz_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t pic32mz_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t pic32mz_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
}
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mz_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int pic32mz_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
@ -169,20 +168,20 @@ int pic32mz_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MZ_SPI4
|
||||
void pic32mz_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void pic32mz_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t pic32mz_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t pic32mz_spi4status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
}
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mz_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int pic32mz_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
@ -191,20 +190,20 @@ int pic32mz_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MZ_SPI5
|
||||
void pic32mz_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void pic32mz_spi5select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t pic32mz_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t pic32mz_spi5status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
}
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mz_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int pic32mz_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
@ -213,20 +212,20 @@ int pic32mz_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MZ_SPI6
|
||||
void pic32mz_spi6select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void pic32mz_spi6select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
uint8_t pic32mz_spi6status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t pic32mz_spi6status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
}
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int pic32mz_spi6cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int pic32mz_spi6cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
|
@ -138,7 +138,7 @@ void weak_function sam_spidev_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void sam_spi0select(enum spi_dev_e devid, bool selected)
|
||||
void sam_spi0select(uint32_t 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
|
||||
@ -170,7 +170,7 @@ void sam_spi0select(enum spi_dev_e devid, bool selected)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ void weak_function sam_spidev_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void sam_spi0select(enum spi_dev_e devid, bool selected)
|
||||
void sam_spi0select(uint32_t devid, bool selected)
|
||||
{
|
||||
switch (devid)
|
||||
{
|
||||
@ -185,7 +185,7 @@ void sam_spi0select(enum spi_dev_e devid, bool selected)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ void weak_function sam_spidev_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void sam_spi0select(enum spi_dev_e devid, bool selected)
|
||||
void sam_spi0select(uint32_t devid, bool selected)
|
||||
{
|
||||
#ifdef CONFIG_SAM4L_XPLAINED_IOMODULE
|
||||
/* Select/de-select the SD card */
|
||||
@ -183,7 +183,7 @@ void sam_spi0select(enum spi_dev_e devid, bool selected)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -231,7 +231,7 @@ uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int sam_spic0mddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spic0mddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_SAM4L_XPLAINED_OLED1MODULE
|
||||
if (devid == SPIDEV_DISPLAY)
|
||||
|
@ -140,7 +140,7 @@ void weak_function sam_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
void sam_spi0select(enum spi_dev_e devid, bool selected)
|
||||
void sam_spi0select(uint32_t devid, bool selected)
|
||||
{
|
||||
#ifdef CONFIG_MTD_AT25
|
||||
/* The AT25 serial FLASH connects using NPCS0 */
|
||||
@ -154,7 +154,7 @@ void sam_spi0select(enum spi_dev_e devid, bool selected)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI1
|
||||
void sam_spi1select(enum spi_dev_e devid, bool selected)
|
||||
void sam_spi1select(uint32_t devid, bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
@ -174,14 +174,14 @@ void sam_spi1select(enum spi_dev_e devid, bool selected)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ void weak_function sam_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
void sam_spi0select(enum spi_dev_e devid, bool selected)
|
||||
void sam_spi0select(uint32_t devid, bool selected)
|
||||
{
|
||||
#ifdef CONFIG_MTD_AT25
|
||||
/* The AT25 serial FLASH connects using NPCS0 */
|
||||
@ -154,7 +154,7 @@ void sam_spi0select(enum spi_dev_e devid, bool selected)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI1
|
||||
void sam_spi1select(enum spi_dev_e devid, bool selected)
|
||||
void sam_spi1select(uint32_t devid, bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
@ -174,14 +174,14 @@ void sam_spi1select(enum spi_dev_e devid, bool selected)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ void weak_function sam_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
void sam_spi0select(enum spi_dev_e devid, bool selected)
|
||||
void sam_spi0select(uint32_t devid, bool selected)
|
||||
{
|
||||
#ifdef CONFIG_MTD_AT25
|
||||
/* The AT25 serial FLASH connects using NPCS0 */
|
||||
@ -154,7 +154,7 @@ void sam_spi0select(enum spi_dev_e devid, bool selected)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI1
|
||||
void sam_spi1select(enum spi_dev_e devid, bool selected)
|
||||
void sam_spi1select(uint32_t devid, bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
@ -174,14 +174,14 @@ void sam_spi1select(enum spi_dev_e devid, bool selected)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ void weak_function sam_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI0
|
||||
void sam_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi0select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
#ifdef CONFIG_SAMD20_XPLAINED_IOMODULE_EXT1
|
||||
@ -176,7 +176,7 @@ void sam_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI1
|
||||
void sam_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
#ifdef CONFIG_SAMD20_XPLAINED_IOMODULE_EXT2
|
||||
@ -204,28 +204,28 @@ void sam_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI2
|
||||
void sam_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi2select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI3
|
||||
void sam_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi3select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI4
|
||||
void sam_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi4select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI5
|
||||
void sam_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi5select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
@ -247,7 +247,7 @@ void sam_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -270,7 +270,7 @@ uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI1
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -293,28 +293,28 @@ uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI2
|
||||
uint8_t sam_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI3
|
||||
uint8_t sam_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI4
|
||||
uint8_t sam_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi4status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI5
|
||||
uint8_t sam_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi5status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
return ret;
|
||||
@ -347,7 +347,7 @@ uint8_t sam_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef SAMDL_HAVE_SPI0
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_SAMD20_XPLAINED_OLED1MODULE_EXT1
|
||||
if (devid == SPIDEV_DISPLAY)
|
||||
@ -368,7 +368,7 @@ int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI1
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_SAMD20_XPLAINED_OLED1MODULE_EXT2
|
||||
if (devid == SPIDEV_DISPLAY)
|
||||
@ -389,28 +389,28 @@ int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI2
|
||||
int sam_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI3
|
||||
int sam_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI4
|
||||
int sam_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI5
|
||||
int sam_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ void weak_function sam_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI0
|
||||
void sam_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi0select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
#ifdef CONFIG_SAMD21_XPLAINED_IOMODULE_EXT1
|
||||
@ -176,7 +176,7 @@ void sam_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI1
|
||||
void sam_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
#ifdef CONFIG_SAMD21_XPLAINED_IOMODULE_EXT2
|
||||
@ -204,28 +204,28 @@ void sam_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI2
|
||||
void sam_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi2select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI3
|
||||
void sam_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi3select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI4
|
||||
void sam_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi4select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI5
|
||||
void sam_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi5select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
@ -247,7 +247,7 @@ void sam_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -270,7 +270,7 @@ uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI1
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -293,28 +293,28 @@ uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI2
|
||||
uint8_t sam_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI3
|
||||
uint8_t sam_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI4
|
||||
uint8_t sam_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi4status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI5
|
||||
uint8_t sam_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi5status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
return ret;
|
||||
@ -347,7 +347,7 @@ uint8_t sam_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef SAMDL_HAVE_SPI0
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_SAMD21_XPLAINED_OLED1MODULE_EXT1
|
||||
if (devid == SPIDEV_DISPLAY)
|
||||
@ -368,7 +368,7 @@ int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI1
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_SAMD21_XPLAINED_OLED1MODULE_EXT2
|
||||
if (devid == SPIDEV_DISPLAY)
|
||||
@ -389,28 +389,28 @@ int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI2
|
||||
int sam_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI3
|
||||
int sam_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI4
|
||||
int sam_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI5
|
||||
int sam_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
@ -141,13 +141,13 @@ void sam_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMV7_SPI0_MASTER
|
||||
void sam_spi0select(enum spi_dev_e devid, bool selected)
|
||||
void sam_spi0select(uint32_t devid, bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMV7_SPI1_MASTER
|
||||
void sam_spi1select(enum spi_dev_e devid, bool selected)
|
||||
void sam_spi1select(uint32_t devid, bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
@ -167,14 +167,14 @@ void sam_spi1select(enum spi_dev_e devid, bool selected)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMV7_SPI0_MASTER
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMV7_SPI1_MASTER
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ void weak_function sam_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI0
|
||||
void sam_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi0select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
#ifdef CONFIG_SAML21_XPLAINED_IOMODULE_EXT1
|
||||
@ -176,7 +176,7 @@ void sam_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI1
|
||||
void sam_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
#ifdef CONFIG_SAML21_XPLAINED_IOMODULE_EXT2
|
||||
@ -204,28 +204,28 @@ void sam_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI2
|
||||
void sam_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi2select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI3
|
||||
void sam_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi3select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI4
|
||||
void sam_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi4select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI5
|
||||
void sam_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void sam_spi5select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
@ -247,7 +247,7 @@ void sam_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -270,7 +270,7 @@ uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI1
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -293,28 +293,28 @@ uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI2
|
||||
uint8_t sam_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI3
|
||||
uint8_t sam_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI4
|
||||
uint8_t sam_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi4status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI5
|
||||
uint8_t sam_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi5status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
return ret;
|
||||
@ -347,7 +347,7 @@ uint8_t sam_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef SAMDL_HAVE_SPI0
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_SAML21_XPLAINED_OLED1MODULE_EXT1
|
||||
if (devid == SPIDEV_DISPLAY)
|
||||
@ -368,7 +368,7 @@ int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI1
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_SAML21_XPLAINED_OLED1MODULE_EXT2
|
||||
if (devid == SPIDEV_DISPLAY)
|
||||
@ -389,28 +389,28 @@ int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI2
|
||||
int sam_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI3
|
||||
int sam_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI4
|
||||
int sam_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMDL_HAVE_SPI5
|
||||
int sam_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int sam_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
@ -141,13 +141,13 @@ void sam_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMV7_SPI0_MASTER
|
||||
void sam_spi0select(enum spi_dev_e devid, bool selected)
|
||||
void sam_spi0select(uint32_t devid, bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMV7_SPI1_MASTER
|
||||
void sam_spi1select(enum spi_dev_e devid, bool selected)
|
||||
void sam_spi1select(uint32_t devid, bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
@ -167,14 +167,14 @@ void sam_spi1select(enum spi_dev_e devid, bool selected)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMV7_SPI0_MASTER
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMV7_SPI1_MASTER
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ void weak_function stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -137,7 +137,7 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
/* The card detect pin is pulled up so that we detect the presence of a card
|
||||
* by see a low value on the input pin.
|
||||
@ -153,7 +153,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -187,7 +187,7 @@ void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -116,19 +116,19 @@ void weak_function stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -151,20 +151,20 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
}
|
||||
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -195,21 +195,21 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||
int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ void weak_function stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
@ -118,31 +118,31 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
|
@ -96,36 +96,36 @@ void weak_function stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
|
@ -96,36 +96,36 @@ void weak_function stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
|
@ -109,18 +109,18 @@ void stm32_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
switch(devid)
|
||||
{
|
||||
@ -138,7 +138,7 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t status = 0;
|
||||
switch(devid)
|
||||
|
@ -73,7 +73,7 @@ void stm32_spidev_initialize(void)
|
||||
* Function asserts given devid based on select
|
||||
****************************************************************************/
|
||||
|
||||
void stm32_spi1select(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool select)
|
||||
{
|
||||
spiinfo("INFO: Selecting spi dev: %d, state: %d\n", devid, select);
|
||||
@ -91,7 +91,7 @@ void stm32_spi1select(struct spi_dev_s *dev, enum spi_dev_e devid,
|
||||
* Return status of devid
|
||||
****************************************************************************/
|
||||
|
||||
uint8_t stm32_spi1status(struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("INFO: Requesting info from spi dev: %d\n", devid);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user