Skip to content

Commit

Permalink
libusb: Reset device on osx
Browse files Browse the repository at this point in the history
  • Loading branch information
ma1co committed Jun 14, 2017
1 parent 67a8763 commit caec9f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pmca/usb/driver/libusb.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""A wrapper to use libusb. Default on linux, on Windows you have to install a generic driver for your camera"""

import sys
import usb.core, usb.util

from . import *
Expand Down Expand Up @@ -94,6 +95,8 @@ def reset(self):
self.dev.detach_kernel_driver(0)
except NotImplementedError:
pass
if sys.platform == 'darwin':
self.dev.reset()

def read(self, length):
return self.dev.read(self.epIn, length).tostring()
Expand Down

0 comments on commit caec9f9

Please sign in to comment.