Skip to content
Commit b0197282 authored by Declan Snyder's avatar Declan Snyder Committed by Anas Nashif
Browse files

tests: spi_loopback: Create transceive ztest wrapper



There was a lot of copy paste of this code:

int ret;
ret = spi_transceive_dt(spec, &tx, &rx);
if (ret) {
       LOG_ERR("Code %d", ret);
       zassert_false(ret, "SPI transceive failed");
       return ret;
}

This is quite redundant and can be simplified.
Also, return is not needed because a failed zassert
will not continue to return anyways.

Signed-off-by: default avatarDeclan Snyder <declan.snyder@nxp.com>
parent 362218c9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment