tests: dma: loop transfer: Modernize zassert usage

zassert_ok() is a more descriptive way to check for errors.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
This commit is contained in:
Reto Schneider 2024-05-01 14:34:58 +02:00 committed by David Leach
parent 673b9cde81
commit bcbe713620
1 changed files with 4 additions and 6 deletions

View File

@ -55,12 +55,10 @@ static void test_transfer(const struct device *dev, uint32_t id)
dma_block_cfg.dest_address = (uint32_t)rx_data[transfer_count];
#endif
zassert_false(dma_config(dev, id, &dma_cfg),
"Not able to config transfer %d",
transfer_count + 1);
zassert_false(dma_start(dev, id),
"Not able to start next transfer %d",
transfer_count + 1);
zassert_ok(dma_config(dev, id, &dma_cfg), "Not able to config transfer %d",
transfer_count + 1);
zassert_ok(dma_start(dev, id), "Not able to start next transfer %d",
transfer_count + 1);
}
}