1 /*
2 * Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #ifndef HAL_IOT_ADC_H
17 #define HAL_IOT_ADC_H
18
19 #include "hi_adc.h"
20 #include "iot_adc.h"
21
AdcRead(IotAdcChannelIndex channel,unsigned const short * data,IotAdcEquModelSel equModel,IotAdcCurBais curBais,unsigned const short rstCnt)22 unsigned int AdcRead(IotAdcChannelIndex channel, unsigned const short *data, IotAdcEquModelSel equModel,
23 IotAdcCurBais curBais, unsigned const short rstCnt)
24 {
25 return hi_adc_read((hi_adc_channel_index)channel, (hi_u16*)data, (hi_adc_equ_model_sel)equModel,
26 (hi_adc_cur_bais)curBais, (hi_u16)rstCnt);
27 }
28 #endif