Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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);
        }