Skip to content

Commit

Permalink
Support PCAN interface on cygwin
Browse files Browse the repository at this point in the history
  • Loading branch information
henzef committed May 19, 2020
1 parent 9908056 commit 1dc43b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions can/interfaces/pcan/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,10 @@ def __init__(self):
logger.error("Exception: The PEAK-driver couldn't be found!")
finally:
winreg.CloseKey(aReg)
elif "CYGWIN" in platform.system():
self.__m_dllBasic = windll.LoadLibrary("PCANBasic")
# Unfortunately cygwin python has no winreg module, so we can't
# check for the registry key.
elif platform.system() == "Darwin":
self.__m_dllBasic = cdll.LoadLibrary("libPCBUSB.dylib")
else:
Expand Down

0 comments on commit 1dc43b8

Please sign in to comment.