#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <math.h>
浏览源代码.
- 作者
- zhengchuangyong (zheng.nosp@m.chua.nosp@m.ngyon.nosp@m.g@em.nosp@m.bedsk.nosp@m.y.ne.nosp@m.t)
- 版本
- 1.0
- 日期
- 2023-05-16
- 版权所有
- Copyright (c) 2023 2023 广州省天嵌嵌入式技术股份有限公司
- 修改日志:
Date | Version | Author | Description |
2023-05-16 | 1.0 | zhengchuangyong | ADC常用操作接口 |
int tq_get_adcValue |
( |
int |
channel | ) |
|
获取ADC通道的值
- 参数
-
- 返回
- int 返回ADC通道的值,失败返回-1
double tq_get_adcVoltage |
( |
int |
channel, |
|
|
int |
adcbit, |
|
|
double |
Vref |
|
) |
| |
获取ADC通道转换成的电压值
- 参数
-
channel | ADC通道 |
adcbit | ADC位数 |
Vref | 参考电压值 |
- 返回
- double 返回ADC通道转换成的电压值,失败返回-1