#ifndef _CHECK_H_
#define _CHECK_H_

#include "common.h"
u_int16_t CRC16( u_int8_t *PuchMsg,u_int16_t usDataLen);
u_int8_t checksum(u_int8_t *pdata,u_int16_t length);
void CRC16_init(u_int16_t *crc16);
void CRC16_update(u_int16_t *crc16, u_int8_t *PuchMsg,u_int32_t usDataLen);
u_int8_t check_xor(u_int8_t *pdata,u_int16_t length);
float  f_Middle(float *ArrDataBuffer);

#if CFG_MODULE_TEMPHUMI
u_int16_t  Middle2(u_int16_t *ArrDataBuffer);
#endif
#if CFG_MODULE_CURRENT
float  Middle1(float *ArrDataBuffer);
float RMS_Val(uint16_t (*data)[RMS_NUM]);
#endif
#endif