1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * 4 * HDF is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 9 #ifndef ADC_TEST_H 10 #define ADC_TEST_H 11 12 #include "adc_if.h" 13 14 #ifdef __cplusplus 15 #if __cplusplus 16 extern "C" { 17 #endif 18 #endif /* __cplusplus */ 19 20 struct AdcTestConfig { 21 uint32_t devNum; 22 uint32_t channel; 23 uint32_t maxChannel; 24 uint32_t dataWidth; 25 uint32_t rate; 26 }; 27 28 struct AdcTester { 29 struct AdcTestConfig config; 30 DevHandle handle; 31 }; 32 33 enum AdcTestCmd { 34 ADC_TEST_CMD_READ = 0, 35 ADC_TEST_CMD_MULTI_THREAD, 36 ADC_TEST_CMD_RELIABILITY, 37 ADC_IF_PERFORMANCE_TEST, 38 ADC_TEST_CMD_MAX, 39 }; 40 41 int32_t AdcTestExecute(int cmd); 42 43 #ifdef __cplusplus 44 #if __cplusplus 45 } 46 #endif 47 #endif /* __cplusplus */ 48 49 #endif /* ADC_TEST_H */ 50