| 112 | } |
| 113 | |
| 114 | int set_feature_function_suspend(libusb_device_handle *handle, int timeout, bool low_power_suspend, bool function_remote_wake) |
| 115 | { |
| 116 | uint8_t suspend_options = 0; |
| 117 | suspend_options |= low_power_suspend ? 1 : 0; |
| 118 | suspend_options |= function_remote_wake ? 2 : 0; |
| 119 | |
| 120 | // for details see USB 3.1 r1 spec section 9.4.9 |
| 121 | |
| 122 | InterfaceFeatureSelector feature_selector = FUNCTION_SUSPEND; |
| 123 | uint8_t bmRequestType = FeatureSelectorRecipient<InterfaceFeatureSelector>::get(); |
| 124 | uint8_t bRequest = LIBUSB_REQUEST_SET_FEATURE; |
| 125 | uint16_t wValue = static_cast<uint16_t>(feature_selector); |
| 126 | uint16_t wIndex = suspend_options << 8 | 0; |
| 127 | uint16_t wLength = 0; |
| 128 | uint8_t *data = 0; |
| 129 | |
| 130 | return libusb_control_transfer(handle, bmRequestType, bRequest, wValue, wIndex, data, wLength, timeout); |
| 131 | } |
| 132 | |
| 133 | int get_max_iso_packet_size(libusb_device *device, int configuration, int alternate_setting, int endpoint) |
| 134 | { |
no outgoing calls
no test coverage detected