2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 11:18:27 +08:00

ad5360: add batched zero-length multi-channel set()

This commit is contained in:
Robert Jördens 2016-03-04 18:14:24 +01:00
parent 4ae3ca5f23
commit 710717ca9b

View File

@ -98,3 +98,15 @@ class AD5360:
self.ldac.off() self.ldac.off()
delay_mu(3*self.bus.ref_period_mu) delay_mu(3*self.bus.ref_period_mu)
self.ldac.on() self.ldac.on()
@kernel
def set(self, values, op=_AD5360_CMD_DATA):
# write() compensation
delay_mu(-len(values)*(self.bus.xfer_period_mu +
self.bus.write_period_mu +
self.bus.ref_period_mu) -
3*self.bus.ref_period_mu) # latency alignment
self.write_channels(values, op)
delay_mu(3*self.bus.ref_period_mu) # latency alignment
self.load()
delay_mu(-3*self.bus.ref_period_mu) # load() compensation