Commit fb3b71dd authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

sw: ei2c.py now has a function to return the value of BIDR

parent 92cca543
......@@ -159,13 +159,16 @@ class EI2C:
def get_ver(self):
return self.ver
def print_bid(self, slot):
# Get the board ID field from the BIDR and return it as ASCII string
def get_bid(self, slot):
bid = self.read(slot, 0x000);
bid = binascii.unhexlify("%s" % "{0:x}".format(bid))
if (bid == "TBLO"):
print("CONV-TTL-BLO found in slot %d" % slot)
elif (bid == "T485"):
print("CONV-TTL-RS485 found in slot %d" % slot)
print ("")
return bid
def _strip_resp(self, msg):
......
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