From b0c80970257911ea65f0776ba22dd9f82d98fe7a Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Sat, 24 Mar 2018 15:39:06 +0100 Subject: [PATCH] ad53xx: remove channel index AND It's incorrect since it doesn't respect the number of channels of any of those chips (none has 64 channels). --- artiq/coredevice/ad53xx.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/coredevice/ad53xx.py b/artiq/coredevice/ad53xx.py index 90d62c6d1..a07c28794 100644 --- a/artiq/coredevice/ad53xx.py +++ b/artiq/coredevice/ad53xx.py @@ -50,7 +50,7 @@ def ad53xx_cmd_write_ch(channel, value, op): :const:`AD53XX_CMD_GAIN`. :return: The 24-bit word to be written to the DAC """ - return op | ((channel & 0x3f) + 8) << 16 | (value & 0xffff) + return op | (channel + 8) << 16 | (value & 0xffff) @portable @@ -65,7 +65,7 @@ def ad53xx_cmd_read_ch(channel, op): :return: The 24-bit word to be written to the DAC """ return (AD53XX_CMD_SPECIAL | AD53XX_SPECIAL_READ | op | - (((channel & 0x3f) + 8) << 7)) + ((channel + 8) << 7)) @portable