Lines Matching refs:raw

212             let raw = LittleEndian::read_u16(&data[field::FRAMECONTROL]);  localVariable
214 ((raw >> $bit) & 0b1) == 0b1
224 let mut raw = LittleEndian::read_u16(data); localVariable
225 raw |= ((val as u16) << $bit);
227 data.copy_from_slice(&raw.to_le_bytes());
291 let raw = LittleEndian::read_u16(&data[field::FRAMECONTROL]); in frame_type() localVariable
292 let ft = (raw & 0b11) as u8; in frame_type()
308 let raw = LittleEndian::read_u16(&data[field::FRAMECONTROL]); in dst_addressing_mode() localVariable
309 let am = ((raw >> 10) & 0b11) as u8; in dst_addressing_mode()
317 let raw = LittleEndian::read_u16(&data[field::FRAMECONTROL]); in frame_version() localVariable
318 let fv = ((raw >> 12) & 0b11) as u8; in frame_version()
326 let raw = LittleEndian::read_u16(&data[field::FRAMECONTROL]); in src_addressing_mode() localVariable
327 let am = ((raw >> 14) & 0b11) as u8; in src_addressing_mode()
341 let raw = data[field::SEQUENCE_NUMBER]; in sequence_number() localVariable
342 Some(raw) in sequence_number()
396 let mut raw = [0u8; 2]; in dst_addr() localVariable
397 raw.clone_from_slice(&addressing_fields[2..4]); in dst_addr()
398 raw.reverse(); in dst_addr()
399 Some(Address::short_from_bytes(raw)) in dst_addr()
402 let mut raw = [0u8; 8]; in dst_addr() localVariable
403 raw.clone_from_slice(&addressing_fields[2..10]); in dst_addr()
404 raw.reverse(); in dst_addr()
405 Some(Address::extended_from_bytes(raw)) in dst_addr()
448 let mut raw = [0u8; 2]; in src_addr() localVariable
449 raw.clone_from_slice(&addressing_fields[offset..offset + 2]); in src_addr()
450 raw.reverse(); in src_addr()
451 Some(Address::short_from_bytes(raw)) in src_addr()
454 let mut raw = [0u8; 8]; in src_addr() localVariable
455 raw.clone_from_slice(&addressing_fields[offset..offset + 8]); in src_addr()
456 raw.reverse(); in src_addr()
457 Some(Address::extended_from_bytes(raw)) in src_addr()
599 let mut raw = LittleEndian::read_u16(data); in set_frame_type() localVariable
601 raw = (raw & !(0b111)) | (u8::from(frame_type) as u16 & 0b111); in set_frame_type()
602 data.copy_from_slice(&raw.to_le_bytes()); in set_frame_type()
614 let mut raw = LittleEndian::read_u16(data); in set_frame_version() localVariable
616 raw = (raw & !(0b11 << 12)) | ((u8::from(version) as u16 & 0b11) << 12); in set_frame_version()
617 data.copy_from_slice(&raw.to_le_bytes()); in set_frame_version()
664 let mut raw = LittleEndian::read_u16(data); in set_dst_addressing_mode() localVariable
666 raw = (raw & !(0b11 << 10)) | ((u8::from(value) as u16 & 0b11) << 10); in set_dst_addressing_mode()
667 data.copy_from_slice(&raw.to_le_bytes()); in set_dst_addressing_mode()
719 let mut raw = LittleEndian::read_u16(data); in set_src_addressing_mode() localVariable
721 raw = (raw & !(0b11 << 14)) | ((u8::from(value) as u16 & 0b11) << 14); in set_src_addressing_mode()
722 data.copy_from_slice(&raw.to_le_bytes()); in set_src_addressing_mode()