pub fn iad(
        &mut self,
        first_interface: InterfaceNumber,
        interface_count: u8,
        function_class: u8,
        function_sub_class: u8,
        function_protocol: u8,
    ) -> Result<()> {
        if !self.write_iads {
            return Ok(());
        }

        self.write(
            descriptor_type::IAD,
            &[
                first_interface.into(), // bFirstInterface
                interface_count,        // bInterfaceCount
                function_class,
                function_sub_class,
                function_protocol,
                0,
            ],
        )?;

        Ok(())
    }
/// Writes a interface association descriptor. Call from `UsbClass::get_configuration_descriptors`
/// before writing the USB class or function's interface descriptors if your class has more than
/// one interface and wants to play nicely with composite devices on Windows. If the USB device
/// hosting the class was not configured as composite with IADs enabled, calling this function
/// does nothing, so it is safe to call from libraries.
///
/// # Arguments
///
/// * `first_interface` - Number of the function's first interface, previously allocated with
///   [`UsbBusAllocator::interface`](crate::bus::UsbBusAllocator::interface).
/// * `interface_count` - Number of interfaces in the function.
/// * `function_class` - Class code assigned by USB.org. Use `0xff` for vendor-specific devices
///   that do not conform to any class.
/// * `function_sub_class` - Sub-class code. Depends on class.
/// * `function_protocol` - Protocol code. Depends on class and sub-class.
Writes a interface association descriptor. Call from `UsbClass::get_configuration_descriptors`
before writing the USB class or function's interface descriptors if your class has more than
one interface and wants to play nicely with composite devices on Windows. If the USB device
hosting the class was not configured as composite with IADs enabled, calling this function
does nothing, so it is safe to call from libraries.
Writes a interface association descriptor . Call from ` UsbClass :: get_configuration_descriptors ` before writing the USB class or function ' s interface descriptors if your class has more than one interface and wants to play nicely with composite devices on Windows . If the USB device hosting the class was not configured as composite with IADs enabled calling this function does nothing so it is safe to call from libraries .
pub fn iad(
        &mut self,
        first_interface: InterfaceNumber,
        interface_count: u8,
        function_class: u8,
        function_sub_class: u8,
        function_protocol: u8,
    ) -> Result<()> {
        if !self.write_iads {
            return Ok(());
        }
        self.write(
            descriptor_type::IAD,
            &[
                first_interface.into(), // bFirstInterface
                interface_count,        // bInterfaceCount
                function_class,
                function_sub_class,
                function_protocol,
                0,
            ],
        )?;
        Ok(())
    }
pub fn iad ( & mut self , first_interface : InterfaceNumber , interface_count : u8 , function_class : u8 , function_sub_class : u8 , function_protocol : u8 , ) -> Result < ( ) > { if ! self . write_iads { return Ok ( ( ) ) ; } self . write ( descriptor_type :: IAD , & [ first_interface . into ( ) , // bFirstInterface interface_count , // bInterfaceCount function_class , function_sub_class , function_protocol , 0 , ] , ) ? ; Ok ( ( ) ) }
Writes a interface association descriptor.
Writes a interface association descriptor .
&mut self
first_interface
InterfaceNumber
interface_count
u8
function_class
u8
function_sub_class
u8
function_protocol
u8
&mut self
first_interface
InterfaceNumber
interface_count
u8
function_class
u8
function_sub_class
u8
function_protocol
u8