(self, vendor=None, product=None, serial_number=None, **kwargs)
| 118 | find_devices = staticmethod(find_tmc_devices) |
| 119 | |
| 120 | def __init__(self, vendor=None, product=None, serial_number=None, **kwargs): |
| 121 | super().__init__(vendor, product, serial_number, **kwargs) |
| 122 | self.usb_intr_in = find_endpoint(self.usb_intf, usb.ENDPOINT_IN, usb.ENDPOINT_TYPE_INTERRUPT) |
| 123 | self.log_debug('EP Address: intr={}'.format(self.usb_intr_in.bEndpointAddress)) |
| 124 | |
| 125 | self.usb_dev.reset() |
| 126 | |
| 127 | time.sleep(0.01) |
| 128 | |
| 129 | self._get_capabilities() |
| 130 | |
| 131 | self._btag = 0 |
| 132 | |
| 133 | if not (self.usb_recv_ep and self.usb_send_ep): |
| 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( |
nothing calls this directly
no test coverage detected