(self, interface, setting)
| 340 | return self.usb_dev.get_active_configuration()[self.INTERFACE] |
| 341 | |
| 342 | def _find_endpoints(self, interface, setting): |
| 343 | recv, send = setting |
| 344 | if recv is None: |
| 345 | recv = find_endpoint(interface, usb.ENDPOINT_IN, usb.ENDPOINT_TYPE_BULK) |
| 346 | else: |
| 347 | recv = usb_find_desc(interface, bEndpointAddress=recv) |
| 348 | |
| 349 | if send is None: |
| 350 | send = find_endpoint(interface, usb.ENDPOINT_OUT, usb.ENDPOINT_TYPE_BULK) |
| 351 | else: |
| 352 | send = usb_find_desc(interface, bEndpointAddress=send) |
| 353 | |
| 354 | return recv, send |
| 355 | |
| 356 | def send(self, data): |
| 357 | """Send raw bytes to the instrument. |
no test coverage detected