Hardware has asynchronous actions where the expectation is to spin on registers and expressions against those registers for completion of the action. This provides a common macro to spin, with a delay and timeout, on such expressions. Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
23 lines
349 B
C
23 lines
349 B
C
/*
|
|
* Copyright (c) 2022 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <ztest.h>
|
|
|
|
extern void test_wait_for(void);
|
|
|
|
/**
|
|
* @defgroup sys_util_tests Sys Util Tests
|
|
* @ingroup all_tests
|
|
* @{
|
|
* @}
|
|
*/
|
|
|
|
void test_main(void)
|
|
{
|
|
ztest_test_suite(sys_util, ztest_unit_test(test_wait_for));
|
|
ztest_run_test_suite(sys_util);
|
|
}
|