This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new e55f28594 examples/calib_udelay: Allow the number of delay loop
iterations to be specified by kconfig.
e55f28594 is described below
commit e55f28594cdb6094c2cc7bc21aaf263d970605d9
Author: Stuart Ianna <[email protected]>
AuthorDate: Wed Jul 5 11:49:21 2023 +1000
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.
---
examples/calib_udelay/Kconfig | 6 ++++++
examples/calib_udelay/calib_udelay_main.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/examples/calib_udelay/Kconfig b/examples/calib_udelay/Kconfig
index a6a8e6932..97b059285 100644
--- a/examples/calib_udelay/Kconfig
+++ b/examples/calib_udelay/Kconfig
@@ -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
diff --git a/examples/calib_udelay/calib_udelay_main.c
b/examples/calib_udelay/calib_udelay_main.c
index 5f1abbf57..8f3638a13 100644
--- a/examples/calib_udelay/calib_udelay_main.c
+++ b/examples/calib_udelay/calib_udelay_main.c
@@ -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