This website requires JavaScript.
Explore
Help
Sign In
OrgZephyr
/
zephyr
mirror of
https://github.com/zephyrproject-rtos/zephyr.git
Watch
1
Star
0
Fork
You've already forked zephyr
0
Code
Issues
Releases
Wiki
Activity
3ffac9981d
zephyr
/
tests
/
drivers
/
adc
/
adc_simple
/
prj.conf
4 lines
55 B
Plaintext
Raw
Normal View
History
Unescape
Escape
tests/drivers/adc: move to ztest to actually test This TC is only exercising the API, as we don't have a feedback loop mechanism to verify whichever values are fed to the ADC. Fixed the loop to complete after 10 runs; on each run, print the values and actually report the difference between them. With no inputs connected (aka: floating), they should be reporting noise relatively close to the previous reading, so we might want to use this delta as a testing pattern (assert if the delta is higher than some value, but I've seen variations as high as 40M units). For now, the test is just happy with being able to read them. The buffer has been re-typed to uint32_t so we can iterate over it without casting tricks -- it requires then only a single cast when initializing sample.buffer (which shall be a void* anyway). Duplicated the buffer, so we can flip/flop between two buffers to compare against the entries read in the previous run. v4: fixed missed warnings Change-Id: If6b48b92231007202d74f5c042f6d0cf3fdcb60a Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-11-05 14:20:53 +08:00
CONFIG_ZTEST=y
samples: Add a tiny test application for ADC API Currently useful only for Galileo. Change-Id: I8d4fafd530e11a50f91cedd0de1691393f270b9c Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2015-10-09 21:26:12 +08:00
CONFIG_ADC=y
tests: adc_simple: Change ADC_DEBUG=y to SYS_LOG_ADC_LEVEL=4 The ADC_DEBUG Kconfig symbol was removed in commit a679f3292061 ("sys_log: replace old debug macros at ADC driver"), which introduced SYS_LOG_ADC_LEVEL and switched to using SYS_LOG_DBG() for debug messages. Remove the ADC_DEBUG=y assignment and set SYS_LOG_ADC_LEVEL=4 so that the debug messages still show up. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-25 22:07:48 +08:00
CONFIG_SYS_LOG_ADC_LEVEL=4