23 lines
706 B
C
23 lines
706 B
C
#ifndef UWATER_DATATOOLS_APP_H
|
|
#define UWATER_DATATOOLS_APP_H
|
|
|
|
#include "type.h"
|
|
|
|
u16 HexToBcd16(u16 value);
|
|
u8 BCD2HEX(u8 bcd_data); //BCD转为HEX子程序
|
|
u8 HEX2BCD(u8 hex_data); //HEX转为BCD子程序
|
|
u32 HexToBcd32(u32 value);
|
|
u32 Gp30DataToBcd(u32 data, u32 times);
|
|
u16 FramHexToBcd16(u16 value);
|
|
void fram_tools_writeU32ByBuf(u8 *pU32Buf, u8 *pSrc, u8 dir);
|
|
u8 check_apply_addr(u8 *p_buf,u8 *des_buf);
|
|
u8 check_cs(u8* start_sddr, u8 datas_len);
|
|
void AES_decrypt(u8 *buf, u8 len, u8 *key);
|
|
void SYNB_AES_decrypt(u8 *buf, u16 len, u8 *key); //沈阳规约数据长度是两个字节
|
|
void AES_encrypt(u8 num,u8 *buf, u16 len, u8 *key);
|
|
u16 CRC16(u8* pchMsg, u16 wDataLen);
|
|
uint8_t AsciiToHex(uint8_t Ascii_Byte);
|
|
|
|
#endif
|
|
|