pub(crate)fncrc_ccitt_update(crc:u16, data:&u8)->u16{letmut d =*data asu16;
d = d ^lo8(crc);
d = d ^(d <<4);
d =(d asu8)asu16;// Ensure d is treated as a u8 for the next operations
((d <<8)|hi8(crc))^(((d >>4)asu8)asu16)^(d <<3)}pub(crate)fnlo8(x:u16)->u16{
x &0xff}pub(crate)fnhi8(x:u16)->u16{
x >>8}