From bec25cbaa03b44274514aea95ac81bd7f5026e60 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 8 Nov 2018 20:13:14 +0800 Subject: [PATCH] suservo: use new rtio_output() API --- artiq/coredevice/suservo.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/artiq/coredevice/suservo.py b/artiq/coredevice/suservo.py index 850cb98e4..2864413ac 100644 --- a/artiq/coredevice/suservo.py +++ b/artiq/coredevice/suservo.py @@ -1,4 +1,4 @@ -from artiq.language.core import kernel, delay, now_mu, delay_mu, portable +from artiq.language.core import kernel, delay, delay_mu, portable from artiq.language.units import us, ns from artiq.coredevice.rtio import rtio_output, rtio_input_data from artiq.coredevice import spi2 as spi @@ -129,7 +129,7 @@ class SUServo: :param addr: Memory location address. :param value: Data to be written. """ - rtio_output(now_mu(), self.channel, addr | WE, value) + rtio_output((self.channel << 8) | addr | WE, value) delay_mu(self.ref_period_mu) @kernel @@ -140,7 +140,7 @@ class SUServo: :param addr: Memory location address. """ - rtio_output(now_mu(), self.channel, addr, 0) + rtio_output((self.channel << 8) | addr, 0) return rtio_input_data(self.channel) @kernel @@ -262,7 +262,7 @@ class Channel: :param en_iir: IIR updates enable :param profile: Active profile (0-31) """ - rtio_output(now_mu(), self.channel, 0, + rtio_output(self.channel << 8, en_out | (en_iir << 1) | (profile << 2)) @kernel