commit | b0197282f9f0a1149fda34a844caf13d7a232f35 | [log] [tgz] |
---|---|---|
author | Declan Snyder <declan.snyder@nxp.com> | Wed Feb 26 12:45:25 2025 -0600 |
committer | Anas Nashif <anas.nashif@intel.com> | Fri Mar 21 14:41:02 2025 -0400 |
tree | 64a68af46ffbfa76fcd9c3c95b8b9b320060066e | |
parent | 362218c900bafeed808de7421fbb816cb9e98f68 [diff] |
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>