天嵌二次封装库使用手册  V1.0
tq_adc.h 文件参考
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <math.h>
tq_adc.h 的引用(Include)关系图:

浏览源代码.

函数

int tq_get_adcValue (int channel)
 获取ADC通道的值 更多...
 
double tq_get_adcVoltage (int channel, int adcbit, double Vref)
 获取ADC通道转换成的电压值 更多...
 

详细描述

作者
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
修改日志:
Date Version Author Description
2023-05-16 1.0 zhengchuangyong ADC常用操作接口

函数说明

int tq_get_adcValue ( int  channel)

获取ADC通道的值

参数
channelADC通道
返回
int 返回ADC通道的值,失败返回-1
double tq_get_adcVoltage ( int  channel,
int  adcbit,
double  Vref 
)

获取ADC通道转换成的电压值

参数
channelADC通道
adcbitADC位数
Vref参考电压值
返回
double 返回ADC通道转换成的电压值,失败返回-1