From a04c6d127b2da7d8749abda4e503a3bb0e3eee8f Mon Sep 17 00:00:00 2001 From: Viktor Dragomiretskyy Date: Fri, 3 Jul 2020 20:24:11 +1200 Subject: [PATCH] Add open9a so that open97 will still attempt to open 0097 device. --- prototype.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/prototype.py b/prototype.py index b486f97..ead6550 100644 --- a/prototype.py +++ b/prototype.py @@ -6,8 +6,7 @@ from proto9x.flash import read_flash from proto9x.sensor import * from proto9x.sid import * -def open97(): - usb.open() +def open_common(): usb.send_init() # try to init TLS session from the flash @@ -19,6 +18,14 @@ def open97(): #usb.trace_enabled = True #tls.trace_enabled = True +def open97(): + usb.open(vendor=0x138a, product=0x0097) + open_common() + +def open9a(): + usb.open(vendor=0x06cb, product=0x009a) + open_common() + def load97(): #usb.trace_enabled = True #tls.trace_enabled = True