| 134 | raise InstrumentError("TMC device must have both Bulk-In and Bulk-out endpoints.") |
| 135 | |
| 136 | def _get_capabilities(self): |
| 137 | cap = self.usb_dev.ctrl_transfer( |
| 138 | usb.util.build_request_type(usb.util.CTRL_IN, |
| 139 | usb.util.CTRL_TYPE_CLASS, |
| 140 | usb.util.CTRL_RECIPIENT_INTERFACE), |
| 141 | REQUEST.GET_CAPABILITIES, |
| 142 | 0x0000, |
| 143 | self.usb_intf.index, |
| 144 | 0x0018, |
| 145 | timeout=self.TIMEOUT) |
| 146 | |
| 147 | def _find_interface(self, dev, setting): |
| 148 | interfaces = find_interfaces(dev, bInterfaceClass=0xFE, bInterfaceSubClass=3) |