usb_descriptor_decoder/descriptors/
desc_configuration.rs1#[derive(Copy, Clone, Debug, Default)]
2#[repr(C, packed)]
3pub struct Configuration {
4 length: u8,
5 ty: u8,
6 total_length: u16,
7 num_interfaces: u8,
8 config_val: u8,
9 config_string: u8,
10 attributes: u8,
11 max_power: u8,
12}
13impl Configuration {
14 pub fn config_val(&self) -> u8 {
15 self.config_val
16 }
17 pub fn length(&self) -> u8 {
18 self.length
19 }
20 pub fn ty(&self) -> u8 {
21 self.ty
22 }
23 pub fn total_length(&self) -> u16 {
24 self.total_length
25 }
26 pub fn num_interfaces(&self) -> u8 {
27 self.num_interfaces
28 }
29 pub fn config_string(&self) -> u8 {
30 self.config_string
31 }
32 pub fn attributes(&self) -> u8 {
33 self.attributes
34 }
35 pub fn max_power(&self) -> u8 {
36 self.max_power
37 }
38}