36 lines
973 B
C
36 lines
973 B
C
/*
|
|
*********************************************************************************************************
|
|
* IAR Development Kits
|
|
* on the
|
|
*
|
|
* M451
|
|
*
|
|
* Filename : 485_sensor.h
|
|
* Version : V1.00
|
|
* Programmer(s) : Qian Xianghong
|
|
*********************************************************************************************************
|
|
*/
|
|
|
|
#ifndef USER_485_SENSOR_PRESENT
|
|
#define USER_485_SENSOR_PRESENT
|
|
|
|
// 初始化引脚
|
|
void Sensor_Init();
|
|
|
|
// 打开设备和允许中断
|
|
void Sensor_Open();
|
|
|
|
// 读取真空计数据
|
|
void Sensor_ReadVacuum(uint8_t sensorIdx, data_sample_t *sample);
|
|
// 读取泄漏报警数据
|
|
void Sensor_ReadLeak(data_sample_t *sample);
|
|
// 读取流量计数据
|
|
void Sensor_ReadFlow(data_sample_t *sample);
|
|
// 通过TTL读取差压值
|
|
uint32_t Sensor_ReadDOL();
|
|
|
|
// MODBUS的CRC算法
|
|
uint16_t MODBUS_RTU_CRC16(const uint8_t *puchMsg, uint16_t usDataLen);
|
|
|
|
#endif
|