funcs

Converted/butchered LIBUSB header to a D-Language interface

Members

Aliases

libusb_hotplug_callback_fn
alias libusb_hotplug_callback_fn = int function(libusb_context* ctx, libusb_device* device, libusb_hotplug_event event, void* user_data)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_hotplug_callback_handle
alias libusb_hotplug_callback_handle = int
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_pollfd_added_cb
alias libusb_pollfd_added_cb = void function(int fd, short events, void* user_data)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_pollfd_removed_cb
alias libusb_pollfd_removed_cb = void function(int fd, void* user_data)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_transfer_cb_fn
alias libusb_transfer_cb_fn = void function(libusb_transfer* transfer)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Functions

libusb_alloc_transfer
libusb_transfer* libusb_alloc_transfer(int iso_packets)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_attach_kernel_driver
int libusb_attach_kernel_driver(libusb_device_handle* dev, int interface_number)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_bulk_transfer
int libusb_bulk_transfer(libusb_device_handle* dev_handle, char endpoint, char* data, int length, int* actual_length, uint timeout)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_cancel_transfer
int libusb_cancel_transfer(libusb_transfer* transfer)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_claim_interface
int libusb_claim_interface(libusb_device_handle* dev, int interface_number)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_clear_halt
int libusb_clear_halt(libusb_device_handle* dev, char endpoint)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_close
void libusb_close(libusb_device_handle* dev_handle)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_control_transfer
int libusb_control_transfer(libusb_device_handle* dev_handle, ubyte request_type, ubyte bRequest, ushort wValue, ushort wIndex, char* data, ushort wLength, uint timeout)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_control_transfer_get_data
char* libusb_control_transfer_get_data(libusb_transfer* transfer)

Get the data section of a control transfer. This convenience function is here to remind you that the data does not start until 8 bytes into the actual buffer, as the setup packet comes first.

libusb_control_transfer_get_setup
libusb_control_setup* libusb_control_transfer_get_setup(libusb_transfer* transfer)

Get the control setup packet of a control transfer. This convenience function is here to remind you that the control setup occupies the first 8 bytes of the transfer data buffer.

libusb_cpu_to_le16
ushort libusb_cpu_to_le16(ushort x)
Undocumented in source. Be warned that the author may not have intended to support it.
libusb_detach_kernel_driver
int libusb_detach_kernel_driver(libusb_device_handle* dev, int interface_number)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_error_name
char* libusb_error_name(int errcode)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_event_handler_active
int libusb_event_handler_active(libusb_context* ctx)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_event_handling_ok
int libusb_event_handling_ok(libusb_context* ctx)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_exit
void libusb_exit(libusb_context* ctx)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_fill_bulk_transfer
void libusb_fill_bulk_transfer(libusb_transfer* transfer, libusb_device_handle* dev_handle, char endpoint, char* buffer, int length, libusb_transfer_cb_fn callback, void* user_data, uint timeout)

Helper function to populate the required \ref libusb_transfer fields for a bulk transfer.

libusb_fill_control_setup
void libusb_fill_control_setup(char* buffer, ubyte bmRequestType, ubyte bRequest, ushort wValue, ushort wIndex, ushort wLength)

Helper function to populate the setup packet (first 8 bytes of the data buffer) for a control transfer. The wIndex, wValue and wLength values should be given in host-endian byte order.

libusb_fill_control_transfer
void libusb_fill_control_transfer(libusb_transfer* transfer, libusb_device_handle* dev_handle, char* buffer, libusb_transfer_cb_fn callback, void* user_data, uint timeout)

Helper function to populate the required \ref libusb_transfer fields for a control transfer.

libusb_fill_interrupt_transfer
void libusb_fill_interrupt_transfer(libusb_transfer* transfer, libusb_device_handle* dev_handle, char endpoint, char* buffer, int length, libusb_transfer_cb_fn callback, void* user_data, uint timeout)

Helper function to populate the required \ref libusb_transfer fields for an interrupt transfer.

libusb_fill_iso_transfer
void libusb_fill_iso_transfer(libusb_transfer* transfer, libusb_device_handle* dev_handle, char endpoint, char* buffer, int length, int num_iso_packets, libusb_transfer_cb_fn callback, void* user_data, uint timeout)

Helper function to populate the required \ref libusb_transfer fields for an isochronous transfer.

libusb_free_bos_descriptor
void libusb_free_bos_descriptor(libusb_bos_descriptor* bos)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_free_config_descriptor
void libusb_free_config_descriptor(libusb_config_descriptor* config)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_free_container_id_descriptor
void libusb_free_container_id_descriptor(libusb_container_id_descriptor* container_id)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_free_device_list
void libusb_free_device_list(libusb_device** list, int unref_devices)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_free_ss_endpoint_companion_descriptor
void libusb_free_ss_endpoint_companion_descriptor(libusb_ss_endpoint_companion_descriptor* ep_comp)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_free_ss_usb_device_capability_descriptor
void libusb_free_ss_usb_device_capability_descriptor(libusb_ss_usb_device_capability_descriptor* ss_usb_device_cap)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_free_transfer
void libusb_free_transfer(libusb_transfer* transfer)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_free_usb_2_0_extension_descriptor
void libusb_free_usb_2_0_extension_descriptor(libusb_usb_2_0_extension_descriptor* usb_2_0_extension)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_active_config_descriptor
int libusb_get_active_config_descriptor(libusb_device* dev, libusb_config_descriptor** config)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_bos_descriptor
int libusb_get_bos_descriptor(libusb_device_handle* handle, libusb_bos_descriptor** bos)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_bus_number
ubyte libusb_get_bus_number(libusb_device* dev)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_config_descriptor
int libusb_get_config_descriptor(libusb_device* dev, ubyte config_index, libusb_config_descriptor** config)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_config_descriptor_by_value
int libusb_get_config_descriptor_by_value(libusb_device* dev, ubyte bConfigurationValue, libusb_config_descriptor** config)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_configuration
int libusb_get_configuration(libusb_device_handle* dev, int* config)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_container_id_descriptor
int libusb_get_container_id_descriptor(libusb_context* ctx, libusb_bos_dev_capability_descriptor* dev_cap, libusb_container_id_descriptor** container_id)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_descriptor
int libusb_get_descriptor(libusb_device_handle* dev, ubyte desc_type, ubyte desc_index, char* data, int length)

Retrieve a descriptor from the default control pipe. This is a convenience function which formulates the appropriate control message to retrieve the descriptor.

libusb_get_device
libusb_device* libusb_get_device(libusb_device_handle* dev_handle)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_device_address
ubyte libusb_get_device_address(libusb_device* dev)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_device_descriptor
int libusb_get_device_descriptor(libusb_device* dev, libusb_device_descriptor* desc)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_device_list
ptrdiff_t libusb_get_device_list(libusb_context* ctx, libusb_device*** list)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_device_speed
int libusb_get_device_speed(libusb_device* dev)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_iso_packet_buffer
char* libusb_get_iso_packet_buffer(libusb_transfer* transfer, uint packet)

Convenience function to locate the position of an isochronous packet within the buffer of an isochronous transfer.

libusb_get_iso_packet_buffer_simple
char* libusb_get_iso_packet_buffer_simple(libusb_transfer* transfer, uint packet)

Convenience function to locate the position of an isochronous packet within the buffer of an isochronous transfer, for transfers where each packet is of identical size.

libusb_get_max_iso_packet_size
int libusb_get_max_iso_packet_size(libusb_device* dev, char endpoint)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_max_packet_size
int libusb_get_max_packet_size(libusb_device* dev, char endpoint)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_next_timeout
int libusb_get_next_timeout(libusb_context* ctx, timeval* tv)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_parent
libusb_device* libusb_get_parent(libusb_device* dev)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_pollfds
libusb_pollfd** libusb_get_pollfds(libusb_context* ctx)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_port_number
ubyte libusb_get_port_number(libusb_device* dev)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_port_numbers
int libusb_get_port_numbers(libusb_device* dev, ubyte* port_numbers, int port_numbers_len)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_port_path
int libusb_get_port_path(libusb_context* ctx, libusb_device* dev, ubyte* path, ubyte path_length)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_ss_endpoint_companion_descriptor
int libusb_get_ss_endpoint_companion_descriptor(libusb_context* ctx, libusb_endpoint_descriptor* endpoint, libusb_ss_endpoint_companion_descriptor** ep_comp)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_ss_usb_device_capability_descriptor
int libusb_get_ss_usb_device_capability_descriptor(libusb_context* ctx, libusb_bos_dev_capability_descriptor* dev_cap, libusb_ss_usb_device_capability_descriptor** ss_usb_device_cap)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_string_descriptor
int libusb_get_string_descriptor(libusb_device_handle* dev, ubyte desc_index, ushort langid, char* data, int length)

Retrieve a descriptor from a device. This is a convenience function which formulates the appropriate control message to retrieve the descriptor. The string returned is Unicode, as detailed in the USB specifications.

libusb_get_string_descriptor_ascii
int libusb_get_string_descriptor_ascii(libusb_device_handle* dev, ubyte desc_index, char* data, int length)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_usb_2_0_extension_descriptor
int libusb_get_usb_2_0_extension_descriptor(libusb_context* ctx, libusb_bos_dev_capability_descriptor* dev_cap, libusb_usb_2_0_extension_descriptor** usb_2_0_extension)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_get_version
libusb_version* libusb_get_version()
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_handle_events
int libusb_handle_events(libusb_context* ctx)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_handle_events_completed
int libusb_handle_events_completed(libusb_context* ctx, int* completed)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_handle_events_locked
int libusb_handle_events_locked(libusb_context* ctx, timeval* tv)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_handle_events_timeout
int libusb_handle_events_timeout(libusb_context* ctx, timeval* tv)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_handle_events_timeout_completed
int libusb_handle_events_timeout_completed(libusb_context* ctx, timeval* tv, int* completed)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_has_capability
int libusb_has_capability(uint capability)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_hotplug_deregister_callback
void libusb_hotplug_deregister_callback(libusb_context* ctx, libusb_hotplug_callback_handle handle)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_hotplug_register_callback
int libusb_hotplug_register_callback(libusb_context* ctx, libusb_hotplug_event events, libusb_hotplug_flag flags, int vendor_id, int product_id, int dev_class, libusb_hotplug_callback_fn cb_fn, void* user_data, libusb_hotplug_callback_handle* handle)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_init
int libusb_init(libusb_context** ctx)

Initialize libusb

libusb_interrupt_transfer
int libusb_interrupt_transfer(libusb_device_handle* dev_handle, char endpoint, char* data, int length, int* actual_length, uint timeout)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_kernel_driver_active
int libusb_kernel_driver_active(libusb_device_handle* dev, int interface_number)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_lock_event_waiters
void libusb_lock_event_waiters(libusb_context* ctx)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_lock_events
void libusb_lock_events(libusb_context* ctx)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_open
int libusb_open(libusb_device* dev, libusb_device_handle** handle)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_open_device_with_vid_pid
libusb_device_handle* libusb_open_device_with_vid_pid(libusb_context* ctx, ushort vendor_id, ushort product_id)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_pollfds_handle_timeouts
int libusb_pollfds_handle_timeouts(libusb_context* ctx)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_ref_device
libusb_device* libusb_ref_device(libusb_device* dev)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_release_interface
int libusb_release_interface(libusb_device_handle* dev, int interface_number)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_reset_device
int libusb_reset_device(libusb_device_handle* dev)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_set_auto_detach_kernel_driver
int libusb_set_auto_detach_kernel_driver(libusb_device_handle* dev, int enable)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_set_configuration
int libusb_set_configuration(libusb_device_handle* dev, int configuration)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_set_debug
void libusb_set_debug(libusb_context* ctx, int level)

Set log message verbosity

libusb_set_interface_alt_setting
int libusb_set_interface_alt_setting(libusb_device_handle* dev, int interface_number, int alternate_setting)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_set_iso_packet_lengths
void libusb_set_iso_packet_lengths(libusb_transfer* transfer, uint length)

Convenience function to set the length of all packets in an isochronous transfer, based on the num_iso_packets field in the transfer structure.

libusb_set_pollfd_notifiers
void libusb_set_pollfd_notifiers(libusb_context* ctx, libusb_pollfd_added_cb added_cb, libusb_pollfd_removed_cb removed_cb, void* user_data)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_setlocale
int libusb_setlocale(char* locale)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_strerror
char* libusb_strerror(int errcode)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_submit_transfer
int libusb_submit_transfer(libusb_transfer* transfer)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_try_lock_events
int libusb_try_lock_events(libusb_context* ctx)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_unlock_event_waiters
void libusb_unlock_event_waiters(libusb_context* ctx)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_unlock_events
void libusb_unlock_events(libusb_context* ctx)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_unref_device
void libusb_unref_device(libusb_device* dev)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
libusb_wait_for_event
int libusb_wait_for_event(libusb_context* ctx, timeval* tv)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

See Also

http://www.libusb.org

Notes: Libusb itself is Copyright

  • 2001 Johannes Erdfelt <johannes@erdfelt.com>
  • 2007-2008 Daniel Drake <dsd@gentoo.org>
  • 2012 Pete Batard <pete@akeo.ie>
  • 2012 Nathan Hjelm <hjelmn@cs.unm.edu>

Meta

Authors

Ross Lonstein <lonstein@brightboxcharge.com>