pub struct TouchReport {
pub data_len: u16,
pub report_id: u8,
pub time_stamp: u16,
pub large_object: u8,
pub record_num: u8,
pub report_counter: u8,
pub noise_effect: u8,
/* private fields */
}Expand description
Prelude data for one or more touch events
Fields§
§data_len: u16Total length of the data; should be 7, 17, or 27
report_id: u8ID of the report
time_stamp: u16Timestamp
large_object: u8§record_num: u8§report_counter: u8§noise_effect: u8Implementations§
Source§impl TouchReport
impl TouchReport
Sourcepub fn read_data_len(input_byte_buffer: &[u8; 7]) -> u16
pub fn read_data_len(input_byte_buffer: &[u8; 7]) -> u16
Reads bits 0 through 15 within output_byte_buffer, getting the data_len field of a TouchReport in bitfield form.
Sourcepub fn read_report_id(input_byte_buffer: &[u8; 7]) -> u8
pub fn read_report_id(input_byte_buffer: &[u8; 7]) -> u8
Reads bits 16 through 23 within output_byte_buffer, getting the report_id field of a TouchReport in bitfield form.
Sourcepub fn read_time_stamp(input_byte_buffer: &[u8; 7]) -> u16
pub fn read_time_stamp(input_byte_buffer: &[u8; 7]) -> u16
Reads bits 24 through 39 within output_byte_buffer, getting the time_stamp field of a TouchReport in bitfield form.
Sourcepub fn read_padding0(input_byte_buffer: &[u8; 7]) -> u8
pub fn read_padding0(input_byte_buffer: &[u8; 7]) -> u8
Reads bits 40 through 41 within output_byte_buffer, getting the padding0 field of a TouchReport in bitfield form.
Sourcepub fn read_large_object(input_byte_buffer: &[u8; 7]) -> u8
pub fn read_large_object(input_byte_buffer: &[u8; 7]) -> u8
Reads bits 42 through 42 within output_byte_buffer, getting the large_object field of a TouchReport in bitfield form.
Sourcepub fn read_record_num(input_byte_buffer: &[u8; 7]) -> u8
pub fn read_record_num(input_byte_buffer: &[u8; 7]) -> u8
Reads bits 43 through 47 within output_byte_buffer, getting the record_num field of a TouchReport in bitfield form.
Sourcepub fn read_report_counter(input_byte_buffer: &[u8; 7]) -> u8
pub fn read_report_counter(input_byte_buffer: &[u8; 7]) -> u8
Reads bits 48 through 49 within output_byte_buffer, getting the report_counter field of a TouchReport in bitfield form.
Sourcepub fn read_padding1(input_byte_buffer: &[u8; 7]) -> u8
pub fn read_padding1(input_byte_buffer: &[u8; 7]) -> u8
Reads bits 50 through 52 within output_byte_buffer, getting the padding1 field of a TouchReport in bitfield form.
Sourcepub fn read_noise_effect(input_byte_buffer: &[u8; 7]) -> u8
pub fn read_noise_effect(input_byte_buffer: &[u8; 7]) -> u8
Reads bits 53 through 55 within output_byte_buffer, getting the noise_effect field of a TouchReport in bitfield form.
Sourcepub fn write_data_len(output_byte_buffer: &mut [u8; 7], data_len: u16)
pub fn write_data_len(output_byte_buffer: &mut [u8; 7], data_len: u16)
Writes to bits 0 through 15 within output_byte_buffer, setting the data_len field of a TouchReport in bitfield form.
Sourcepub fn write_report_id(output_byte_buffer: &mut [u8; 7], report_id: u8)
pub fn write_report_id(output_byte_buffer: &mut [u8; 7], report_id: u8)
Writes to bits 16 through 23 within output_byte_buffer, setting the report_id field of a TouchReport in bitfield form.
Sourcepub fn write_time_stamp(output_byte_buffer: &mut [u8; 7], time_stamp: u16)
pub fn write_time_stamp(output_byte_buffer: &mut [u8; 7], time_stamp: u16)
Writes to bits 24 through 39 within output_byte_buffer, setting the time_stamp field of a TouchReport in bitfield form.
Sourcepub fn write_padding0(output_byte_buffer: &mut [u8; 7], padding0: u8)
pub fn write_padding0(output_byte_buffer: &mut [u8; 7], padding0: u8)
Writes to bits 40 through 41 within output_byte_buffer, setting the padding0 field of a TouchReport in bitfield form.
Sourcepub fn write_large_object(output_byte_buffer: &mut [u8; 7], large_object: u8)
pub fn write_large_object(output_byte_buffer: &mut [u8; 7], large_object: u8)
Writes to bits 42 through 42 within output_byte_buffer, setting the large_object field of a TouchReport in bitfield form.
Sourcepub fn write_record_num(output_byte_buffer: &mut [u8; 7], record_num: u8)
pub fn write_record_num(output_byte_buffer: &mut [u8; 7], record_num: u8)
Writes to bits 43 through 47 within output_byte_buffer, setting the record_num field of a TouchReport in bitfield form.
Sourcepub fn write_report_counter(
output_byte_buffer: &mut [u8; 7],
report_counter: u8,
)
pub fn write_report_counter( output_byte_buffer: &mut [u8; 7], report_counter: u8, )
Writes to bits 48 through 49 within output_byte_buffer, setting the report_counter field of a TouchReport in bitfield form.
Sourcepub fn write_padding1(output_byte_buffer: &mut [u8; 7], padding1: u8)
pub fn write_padding1(output_byte_buffer: &mut [u8; 7], padding1: u8)
Writes to bits 50 through 52 within output_byte_buffer, setting the padding1 field of a TouchReport in bitfield form.
Sourcepub fn write_noise_effect(output_byte_buffer: &mut [u8; 7], noise_effect: u8)
pub fn write_noise_effect(output_byte_buffer: &mut [u8; 7], noise_effect: u8)
Writes to bits 53 through 55 within output_byte_buffer, setting the noise_effect field of a TouchReport in bitfield form.
Trait Implementations§
Source§impl Bitfields<7> for TouchReport
impl Bitfields<7> for TouchReport
Source§const BIT_SIZE: usize = 56usize
const BIT_SIZE: usize = 56usize
Source§fn into_bytes(self) -> [u8; 7]
fn into_bytes(self) -> [u8; 7]
Source§impl Clone for TouchReport
impl Clone for TouchReport
Source§fn clone(&self) -> TouchReport
fn clone(&self) -> TouchReport
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more