API Reference

adafruit_usb_host_descriptors

Helpers for getting USB descriptors

  • Author(s): Scott Shawcroft

adafruit_usb_host_descriptors.find_boot_keyboard_endpoint(device)

Try to find a boot keyboard endpoint in the device and return its interface index, and endpoint address. :param device: The device to search within :return: keyboard_interface_index, keyboard_endpoint_address if found, or None, None otherwise

adafruit_usb_host_descriptors.find_boot_mouse_endpoint(device)

Try to find a boot mouse endpoint in the device and return its interface index, and endpoint address. :param device: The device to search within :return: mouse_interface_index, mouse_endpoint_address if found, or None, None otherwise

adafruit_usb_host_descriptors.find_gamepad_endpoint(device)

Try to find a report mouse endpoint in the device and return its interface index, and endpoint address. :param device: The device to search within :return: mouse_interface_index, mouse_endpoint_address if found, or None, None otherwise

adafruit_usb_host_descriptors.find_joystick_endpoint(device)

Try to find a report mouse endpoint in the device and return its interface index, and endpoint address. :param device: The device to search within :return: mouse_interface_index, mouse_endpoint_address if found, or None, None otherwise

adafruit_usb_host_descriptors.find_report_mouse_endpoint(device)

Try to find a report mouse endpoint in the device and return its interface index, and endpoint address. :param device: The device to search within :return: mouse_interface_index, mouse_endpoint_address if found, or None, None otherwise

adafruit_usb_host_descriptors.get_configuration_descriptor(device, index)

Fetch the configuration descriptor, its associated descriptors and return it.

adafruit_usb_host_descriptors.get_descriptor(device, desc_type, index, buf, language_id=0)

Fetch the descriptor from the device into buf.

adafruit_usb_host_descriptors.get_device_descriptor(device)

Fetch the device descriptor and return it.

adafruit_usb_host_descriptors.get_report_descriptor(device, interface_num, length)

Fetches the HID Report Descriptor. This tells us what the device actually IS (Mouse vs Joystick).