From fbae557fa9ac9dc7c3c189a3699dbad80fb149ee Mon Sep 17 00:00:00 2001 From: yinshuqing Date: Mon, 2 Aug 2021 19:52:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86adc=5Ftest.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yinshuqing --- test/unittest/platform/common/adc_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/unittest/platform/common/adc_test.c b/test/unittest/platform/common/adc_test.c index 1ab30f035..bf3cd9142 100644 --- a/test/unittest/platform/common/adc_test.c +++ b/test/unittest/platform/common/adc_test.c @@ -110,6 +110,7 @@ int32_t AdcTestRead(void) return HDF_ERR_INVALID_OBJECT; } for (i = 0; i < TEST_ADC_VAL_NUM; i++) { + value[i]=0; ret = AdcRead(tester->handle, tester->config.channel, &value[i]); if (ret != HDF_SUCCESS || value[i] >= (1 << tester->config.dataWidth)) { HDF_LOGE("%s: read value invalid:%u, ret:%d", __func__, value[i], ret); -- Gitee From 9a9e860f327cae6e9cb37edd819c36bcd930d9e9 Mon Sep 17 00:00:00 2001 From: yinshuqing Date: Tue, 3 Aug 2021 08:58:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86adc=5Ftest.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yinshuqing --- test/unittest/platform/common/adc_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unittest/platform/common/adc_test.c b/test/unittest/platform/common/adc_test.c index bf3cd9142..166883282 100644 --- a/test/unittest/platform/common/adc_test.c +++ b/test/unittest/platform/common/adc_test.c @@ -110,7 +110,7 @@ int32_t AdcTestRead(void) return HDF_ERR_INVALID_OBJECT; } for (i = 0; i < TEST_ADC_VAL_NUM; i++) { - value[i]=0; + value[i] = 0; ret = AdcRead(tester->handle, tester->config.channel, &value[i]); if (ret != HDF_SUCCESS || value[i] >= (1 << tester->config.dataWidth)) { HDF_LOGE("%s: read value invalid:%u, ret:%d", __func__, value[i], ret); -- Gitee