Commit 988a6672 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

sw: Changed return status of vv_load() function

This function now returns more Linux-oriented error codes (0 is success, 2 is
failure)
parent 67c9922c
......@@ -216,7 +216,7 @@ if __name__ == '__main__':
try:
# First load a firmware and read back a register to confirm correct load.
if bus.vv_load()==1:
if bus.vv_load() == 0:
msg = "INFO: Found CONV-TTL-RS485 board in slot %d\n" % (lun)
inf.write(msg + '\n')
......
......@@ -224,10 +224,10 @@ class SKT(object):
bid = self.vv_read(BIDR)
bid = binascii.unhexlify("%s" % "{0:x}".format(bid))
if bid in BIDR_ARR:
return 1
return 0
else:
raise BusException("Failed vv_load: FPGA: Bad board ID: %s" % bid)
return 0
return 2
def vv_init(self):
""" Init the library, its a NO-OP in SKT class
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment