ad53xx: distinguish errors

pull/1522/head
Robert Jördens 2020-09-17 14:13:10 +00:00
parent c55f2222dc
commit a65239957f
1 changed files with 2 additions and 0 deletions

View File

@ -178,6 +178,8 @@ class AD53xx:
self.write_offset_dacs_mu(self.offset_dacs)
if not blind:
ctrl = self.read_reg(channel=0, op=AD53XX_READ_CONTROL)
if ctrl == 0xffff:
raise ValueError("DAC not found")
if ctrl & 0b10000:
raise ValueError("DAC over temperature")
delay(25*us)