uint8_t Crc8_8541(uint8_t *pucData, uint8_t ucDataLen)
{
uint8_t ucCrc = 0;
uint8_t ucNum;
while(ucDataLen--)
{
ucCrc ^= *pucData++;
for(ucNum = 0;ucNum < 8;ucNum++)
{
if(ucCrc & 0x01)
{
ucCrc = (ucCrc >> 1) ^ 0x8c;
}
else
ucCrc >>= 1;
}
}
return(ucCrc);
}
//浮點數
typedef union
{
struct
{
unsigned char low_byte;
unsigned char mlow_byte;
unsigned char mhigh_byte;
unsigned char high_byte;
}float_byte;
float value;
}FLAOT_UNION;