Skip to content
Snippets Groups Projects
Commit f2622cf9 authored by Martin Teichmann's avatar Martin Teichmann
Browse files

support terminals that only read 4 eeprom bytes

some terminals do not support reading 8 bytes of the eeprom at
a time, we have to limit to 4 bytes at a time
parent dcea6fa8
No related branches found
No related tags found
No related merge requests found
......@@ -584,7 +584,13 @@ class Terminal:
busy = 0x8000
while busy & 0x8000:
busy, data = await self.read(0x502, "H4x8s")
return data
if busy & 0x40: # otherwise we actually only read 4 bytes
return data
await self.write(0x502, "HI", 0x100, start + 2)
busy = 0x8000
while busy & 0x8000:
busy, data2 = await self.read(0x502, "H4x4s")
return data[:4] + data2
async def eeprom_write_one(self, start, data):
"""read 2 bytes from the eeprom at `start`"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment