openUBMC Chip Abstract Layer V0.1
载入中...
搜索中...
未找到
adc.h
浏览该文件的文档.
1/*
2 * Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
3 *
4 * this file licensed under the Mulan PSL v2.
5 * You can use this software according to the terms and conditions of the Mulan PSL v2.
6 * You may obtain a copy of Mulan PSL v2 at:
7 * http://license.coscl.org.cn/MulanPSL2
8 *
9 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
10 * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
11 * PURPOSE.
12 * See the Mulan PSL v2 for more details.
13 *
14 * Create: 2025-07-17
15 */
16
21#ifndef DRIVER_ADC_H
22#define DRIVER_ADC_H
23#include "driver.h"
24
25namespace DRIVER_ADC {
26using namespace bcal;
27
34enum class VOLT_REF_SRC {
37};
38
48
53class Adc : public IDriver {
54public:
60 virtual uint32_t read(int32_t index) = 0;
61};
62}
63
64#endif // DRIVER_ADC_H
VOLT_REF_SRC
参考电压源选择
Definition adc.h:34
ADC 驱动抽象接口类
Definition adc.h:53
virtual uint32_t read(int32_t index)=0
读取 ADC 转换结果
BCAL层驱动公共接口
Definition driver.h:41
BCAL 驱动公共接口定义
ADC 配置参数结构体
Definition adc.h:43
uint32_t rate
Definition adc.h:44
uint32_t volt_ref_val
Definition adc.h:46
VOLT_REF_SRC volt_ref_src
Definition adc.h:45