mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-16 05:42:56 +00:00
Add Linux support to tmc example
Replaces visa include with pyvisa, as visa use with PyVISA is being deprecated.
This commit is contained in:
parent
62d4652f86
commit
dc2f00cca1
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import visa
|
||||
import pyvisa as visa
|
||||
import time
|
||||
import sys
|
||||
|
||||
@ -142,8 +142,16 @@ def test_stall_ep0():
|
||||
|
||||
assert (inst.read_stb() == 0)
|
||||
|
||||
os = sys.platform
|
||||
if os == "linux" or os == "linux2":
|
||||
rm = visa.ResourceManager("@py")
|
||||
elif os == "darwin":
|
||||
## Not tested
|
||||
print("Mac not tested\n");
|
||||
sys.exit()
|
||||
elif os == "win32":
|
||||
rm = visa.ResourceManager("/c/Windows/system32/visa64.dll")
|
||||
|
||||
rm = visa.ResourceManager("/c/Windows/system32/visa64.dll")
|
||||
reslist = rm.list_resources("USB?::?*::INSTR")
|
||||
print(reslist)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user