pub fn calculate_crc16( data: &[u8], poly: u16, init: u16, ref_in: bool, ref_out: bool, xor_out: u16 ) -> u16