- public bool bulk_transfer (uint8 endpoint, uint8[] data, out size_t actual_length, uint timeout, Cancellable? cancellable = null) throws Error
Perform a USB bulk transfer.
- public async ssize_t bulk_transfer_async (uint8 endpoint, uint8[] data, uint timeout, Cancellable? cancellable) throws Error
Do an async bulk transfer
- public bool claim_interface (int @interface, DeviceClaimInterfaceFlags flags) throws Error
Claim an interface of the device.
- public bool close () throws Error
Closes the device when it is no longer required.
- public bool control_transfer (DeviceDirection direction, DeviceRequestType request_type, DeviceRecipient recipient, uint8 request, uint16 value, uint16 idx, uint8[] data, out size_t actual_length, uint timeout, Cancellable? cancellable = null) throws Error
Perform a USB control transfer.
- public async ssize_t control_transfer_async (DeviceDirection direction, DeviceRequestType request_type, DeviceRecipient recipient, uint8 request, uint16 value, uint16 idx, uint8[] data, uint timeout, Cancellable? cancellable) throws Error
Do an async control transfer
- public uint8 get_address ()
Gets the USB address for the device.
- public uint8 get_bus ()
Gets the USB bus number for the device.
- public GenericArray<Device> get_children ()
Gets the device children if any exist.
- public int get_configuration () throws Error
Get the bConfigurationValue for the active configuration of the
device.
- public uint8 get_configuration_index ()
Get the index for the active Configuration string descriptor ie,
iConfiguration.
- public uint8 get_custom_index (uint8 class_id, uint8 subclass_id, uint8 protocol_id) throws Error
Gets the string index from the vendor class interface descriptor.
- public uint8 get_device_class ()
- public uint8 get_device_protocol ()
Gets the device protocol qualified by the class and subclass numbers.
- public uint8 get_device_subclass ()
Gets the device subclass qualified by the class number.
- public Interface get_interface (uint8 class_id, uint8 subclass_id, uint8 protocol_id) throws Error
Gets the first interface that matches the vendor class interface
descriptor.
- public GenericArray<unowned Interface> get_interfaces () throws Error
Gets all the interfaces exported by the device.
- public uint8 get_manufacturer_index ()
Gets the index for the Manufacturer string descriptor.
- public Device get_parent ()
Gets the device parent if one exists.
- public uint16 get_pid ()
Gets the product ID for the device.
- public unowned string get_pid_as_str ()
Gets the product ID for the device as a string.
- public unowned string get_platform_id ()
Gets the platform identifier for the device.
- public uint8 get_port_number ()
Gets the USB port number for the device.
- public uint8 get_product_index ()
Gets the index for the Product string descriptor.
- public uint16 get_release ()
Gets the BCD firmware version number for the device.
- public uint8 get_serial_number_index ()
Gets the index for the Serial Number string descriptor.
- public uint16 get_spec ()
Gets the BCD specification revision for the device.
- public string get_string_descriptor (uint8 desc_index) throws Error
Get a string descriptor from the device.
- public Bytes get_string_descriptor_bytes (uint8 desc_index, uint16 langid) throws Error
Get a raw string descriptor from the device.
- public Bytes get_string_descriptor_bytes_full (uint8 desc_index, uint16 langid, size_t length) throws Error
Get a raw string descriptor from the device.
- public uint16 get_vid ()
Gets the vendor ID for the device.
- public unowned string get_vid_as_str ()
Gets the vendor ID for the device as a string.
- public bool interrupt_transfer (uint8 endpoint, uint8[] data, out size_t actual_length, uint timeout, Cancellable? cancellable = null) throws Error
Perform a USB interrupt transfer.
- public async ssize_t interrupt_transfer_async (uint8 endpoint, uint8[] data, uint timeout, Cancellable? cancellable) throws Error
Do an async interrupt transfer
- public bool open () throws Error
Opens the device for use.
- public bool release_interface (int @interface, DeviceClaimInterfaceFlags flags) throws Error
Release an interface of the device.
- public bool reset () throws Error
Perform a USB port reset to reinitialize a device.
- public bool set_configuration (int configuration) throws Error
Set the active bConfigurationValue for the device.
- public bool set_interface_alt (int @interface, uint8 alt) throws Error
Sets an alternate setting on an interface.