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:
Declan Snyder <declan.snyder@nxp.com>
Loading
Please sign in to comment