⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 drv_tlc2543.h

📁 12位ADC芯片TLC2543的驱动程序
💻 H
字号:
/*************************************************************************
 *
 *    Used with ADS1.2.
 *
 *    (c) Copyright ARM Systems 2008
 *
 *    File name   : drv_tlc2543.h
 *    Description : TLC2543芯片驱动头文件
 *
 *    History :
 *    1. Data   	 : 07-06, 2008
 *  	 Author 	 : SuperLJM
 *  	 Description : Create
 *
 *    $Revision: 1.1 $
 **************************************************************************/

#ifndef  __DRV_TLC2543
#define  __DRV_TLC2543

#include "config.h"

typedef struct {

	unsigned char datalength;				// 数据长度(8,12,16)
	unsigned char dataformat;				// 数据格式(MSB,LSB)
	unsigned char volpol;					// 电压极性(单极性,双极性)
	
	unsigned int Vref;						// 基准电压值
	unsigned int OvTime;					// 读写超时系数

}ADCTLC2543;

/*****************************************************************************
* 函数名: Tlc2543Init
* 说明  : TLC1543芯片初始化
* 参数  : None
* 返回值: None
* 
*****************************************************************************/
extern void Tlc2543Init(void);

/*****************************************************************************
* 函数名: Tlc2543Read
* 说明  : 读取TLC2543转换值
* 参数  : ch    - 通道号( 0 - 10, 加3个校准通道 )
* 		  num   - 采样数
*         aderr - 错误类型(返回值)
*
* 返回值: 采样到的电压值
* 
*****************************************************************************/
float Tlc2543Read(unsigned char ch,unsigned int num,unsigned char *aderr);

#endif  /* __DRV_TLC2543 */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -