examples/calib_udelay: Allow the number of delay loop iterations to be specified by kconfig.

The calibration test can take a long time on platforms with less
processing power. Allow the default value to be changed with kconfig.
This commit is contained in:
Stuart Ianna 2023-07-05 11:49:21 +10:00 committed by Xiang Xiao
parent 7605197f9d
commit e55f28594c
2 changed files with 7 additions and 1 deletions

View File

@ -22,4 +22,10 @@ config EXAMPLES_CALIB_UDELAY_NUM_RESULTS
int "Number of results to generate for calibration slope"
default 20
config EXAMPLES_CALIB_UDELAY_DELAY_TEST_ITERATIONS
int "Delay loop interrations per test."
default 100000
---help---
Lower numbers decrease the time taken for the test to complete,
but may reduce the accuracy of the results.
endif

View File

@ -43,7 +43,7 @@
# define CONFIG_EXAMPLES_CALIB_UDELAY_NUM_RESULTS 20
#endif
#define DELAY_TEST_ITERS 100000
#define DELAY_TEST_ITERS CONFIG_EXAMPLES_CALIB_UDELAY_DELAY_TEST_ITERATIONS
/****************************************************************************
* Private Types