samples/spi: Make async test optional
Handle the case when the async transceive call returns ENOTSUP. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
ed608ba2d8
commit
9eb865e03a
1 changed files with 5 additions and 0 deletions
|
@ -287,6 +287,11 @@ static int spi_async_call(struct spi_config *spi_conf)
|
||||||
|
|
||||||
ret = spi_transceive_async(spi_conf, tx_bufs, ARRAY_SIZE(tx_bufs),
|
ret = spi_transceive_async(spi_conf, tx_bufs, ARRAY_SIZE(tx_bufs),
|
||||||
rx_bufs, ARRAY_SIZE(rx_bufs), &async_sig);
|
rx_bufs, ARRAY_SIZE(rx_bufs), &async_sig);
|
||||||
|
if (ret == -ENOTSUP) {
|
||||||
|
SYS_LOG_DBG("Not supported");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
SYS_LOG_ERR("Code %d", ret);
|
SYS_LOG_ERR("Code %d", ret);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue