public static bool L1Object_CheckCRC(byte[] u8Buff, int offset, int u16Len) { //ASSERT(u8Buff); crc8 crcHandler = new crc8(); return(u8Buff[offset + u16Len - 1] == crcHandler.crc_8(u8Buff, offset, u16Len - 1)); }
public static int L1Object_AppendCRC(ref byte[] u8Buff, int offset, int u16Len) { //ASSERT(u8Buff); //ASSERT(u16Len > 1); crc8 crcHandler = new crc8(); u8Buff[offset + u16Len - 1] = crcHandler.crc_8(u8Buff, offset, u16Len - 1); return(1); }