ARM arch changes
This commit is contained in:
parent
e1df34912d
commit
c56c6f7ccc
@ -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,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
uint32_t; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: efm32_spibus_initialize
|
||||
@ -101,26 +101,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,7 @@ extern "C"
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
uint32_t; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: imx_spibus_initialize
|
||||
@ -225,10 +225,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,7 @@ extern "C"
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
uint32_t; /* Forward reference */
|
||||
|
||||
/************************************************************************************
|
||||
* Name: imx_spibus_initialize
|
||||
@ -118,42 +118,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
|
||||
|
||||
|
@ -115,24 +115,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,7 @@ extern "C"
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
uint32_t; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: kl_spibus_initialize
|
||||
@ -111,18 +111,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,7 @@ extern "C"
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
uint32_t; /* Forward reference */
|
||||
|
||||
/************************************************************************************
|
||||
* Name: lpc17_spibus_initialize
|
||||
@ -115,10 +115,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,7 @@
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
uint32_t; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc23_spibus_initialize
|
||||
@ -178,7 +178,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,7 +185,7 @@ void lpc31_clockconfig(void);
|
||||
************************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
uint32_t; /* Forward reference */
|
||||
|
||||
FAR struct spi_dev_s *lpc31_spibus_initialize(int port);
|
||||
|
||||
@ -218,10 +218,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,7 @@ extern "C"
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
uint32_t; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spibus_initialize
|
||||
@ -189,10 +189,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 +211,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 +243,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,7 @@ extern "C"
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
uint32_t; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spibus_initialize
|
||||
@ -182,10 +182,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 +204,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 +236,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,7 @@ extern "C"
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
uint32_t; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_spibus_initialize
|
||||
@ -168,32 +168,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 +213,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 +262,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,7 @@ extern "C"
|
||||
****************************************************************************/
|
||||
|
||||
struct spi_dev_s; /* Forward reference */
|
||||
enum spi_dev_e; /* Forward reference */
|
||||
uint32_t; /* Forward reference */
|
||||
struct spi_sctrlr_s; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
@ -255,10 +255,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 +277,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 +309,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 */
|
||||
|
||||
|
@ -117,39 +117,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
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -112,39 +112,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
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -117,21 +117,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,11 @@ 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);
|
||||
uint32_t;
|
||||
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)
|
||||
|
@ -115,24 +115,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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user