forked from M-Labs/artiq
ad9910: handle unprogrammed EEPROM and numpy corner cases
This commit is contained in:
parent
7cdcaf0d00
commit
d07c6fcfea
@ -141,7 +141,10 @@ class AD9910:
|
|||||||
io_update_delay = word & 0xff
|
io_update_delay = word & 0xff
|
||||||
else:
|
else:
|
||||||
io_update_delay = 0
|
io_update_delay = 0
|
||||||
return device, offset, sync_delay_seed, io_update_delay
|
if io_update_delay == 0xff: # unprogrammed EEPROM
|
||||||
|
io_update_delay = 0
|
||||||
|
# With Numpy, type(int32(-1) >> 1) == int64
|
||||||
|
return device, offset, int32(sync_delay_seed), int32(io_update_delay)
|
||||||
|
|
||||||
if isinstance(sync_delay_seed, str):
|
if isinstance(sync_delay_seed, str):
|
||||||
self.sync_delay_seed_eeprom, self.sync_delay_seed_offset, sync_delay_seed, _ = \
|
self.sync_delay_seed_eeprom, self.sync_delay_seed_offset, sync_delay_seed, _ = \
|
||||||
|
Loading…
Reference in New Issue
Block a user