python-validity/prototype.py
Viktor Dragomiretskyy 269fd1955e A bit of refactoring
2019-08-26 23:05:42 +12:00

28 lines
518 B
Python

from proto97.tls import tls
from proto97.usb import usb
from proto97.db import db
from proto97.flash import read_flash
from proto97.sensor import *
from proto97.sid import *
def open97():
usb.open()
usb.send_init()
# try to init TLS session from the flash
tls.parseTlsFlash(read_flash(1, 0, 0x1000))
tls.open()
tls.save()
#usb.trace_enabled = True
#tls.trace_enabled = True
def load97():
#usb.trace_enabled = True
#tls.trace_enabled = True
usb.open()
tls.load()