spi: Add an error callback type
Such type will be used in case of unrecoverable error on driver side while transceiving. Taking the opportunity to fix spi_transceive declaration as it should be static. Change-Id: I7392f93b34cf6d74900c844607cf03e741837876 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
7d0e1d9218
commit
1804292f6d
1 changed files with 3 additions and 2 deletions
|
@ -61,7 +61,8 @@ extern "C" {
|
|||
enum spi_cb_type {
|
||||
SPI_CB_WRITE = 1,
|
||||
SPI_CB_READ = 2,
|
||||
SPI_CB_TRANSCEIVE = 3
|
||||
SPI_CB_TRANSCEIVE = 3,
|
||||
SPI_CB_ERROR = 4
|
||||
};
|
||||
|
||||
/* application callback function signature */
|
||||
|
@ -177,7 +178,7 @@ static inline int spi_write(struct device *dev, uint8_t *buf, uint32_t len)
|
|||
*
|
||||
* @return DEV_OK if successful, another DEV_* code otherwise.
|
||||
*/
|
||||
inline int spi_transceive(struct device *dev,
|
||||
static inline int spi_transceive(struct device *dev,
|
||||
uint8_t *tx_buf, uint32_t tx_buf_len,
|
||||
uint8_t *rx_buf, uint32_t rx_buf_len)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue