Fix/improve some issues in the SPI slave interface header file

This commit is contained in:
Gregory Nutt 2015-08-09 12:06:46 -06:00
parent 7317f3bd88
commit 5848101c1f
3 changed files with 11 additions and 7 deletions

View File

@ -10794,4 +10794,6 @@
(2015-08-06).
* include/nuttx/spi/slave.h: Add a definition of an SPI slave
interface (2015-08-08).
* arch/arm/src/samv7: Add the framework for an SPI slave drvier. This
driver has a lot of missing logic on initial commit (2015-08-09).

2
arch

@ -1 +1 @@
Subproject commit b1a50470634cf0b876af4380c42427d53aaceb06
Subproject commit fa4211a00c6139d9ea08105caad9f92a4f029352

View File

@ -294,12 +294,14 @@ enum spi_smode_e
/* The SPI slave controller driver vtable */
struct spi_sctrlr_s;
struct spi_sdev_s;
struct spi_slaveops_s
struct spi_sctrlr_s; /* Forward reference */
struct spi_sdev_s; /* Forward reference */
struct spi_sctrlrops_s
{
CODE void (*bind)(FAR struct spi_sctrlr_s *sctrlr,
FAR spi_sdev_s *sdev, enum spi_mode_e mode, int nbits);
FAR struct spi_sdev_s *sdev, enum spi_smode_e mode,
int nbits);
CODE void (*unbind)(FAR struct spi_sctrlr_s *sctrlr);
CODE void (*setdata)(FAR struct spi_sctrlr_s *sctrlr, uint16_t data);
};
@ -312,7 +314,7 @@ struct spi_slaveops_s
struct spi_sctrlr_s
{
FAR const struct spi_slaveops_s *ops;
FAR const struct spi_sctrlrops_s *ops;
/* Private SPI slave controller driver data may follow */
};
@ -324,7 +326,7 @@ struct spi_sdevops_s
CODE void (*selected)(FAR struct spi_sdev_s *sdev, bool isselected);
CODE void (*cmddata)(FAR struct spi_sdev_s *sdev, bool isdata);
CODE uint16_t (*getdata)(FAR struct spi_sdev_s *sdev);
CODE uint16_t (*exchange)(FAR struct spi_sdev_s *sdev), uint16_t cmd);
CODE uint16_t (*exchange)(FAR struct spi_sdev_s *sdev, uint16_t cmd);
};
/* SPI slave device private data. This structure only defines the initial