forked from M-Labs/artiq
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).
This commit is contained in:
parent
77bcc2c78f
commit
b0c8097025
|
@ -50,7 +50,7 @@ def ad53xx_cmd_write_ch(channel, value, op):
|
||||||
:const:`AD53XX_CMD_GAIN`.
|
:const:`AD53XX_CMD_GAIN`.
|
||||||
:return: The 24-bit word to be written to the DAC
|
: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
|
@portable
|
||||||
|
@ -65,7 +65,7 @@ def ad53xx_cmd_read_ch(channel, op):
|
||||||
:return: The 24-bit word to be written to the DAC
|
:return: The 24-bit word to be written to the DAC
|
||||||
"""
|
"""
|
||||||
return (AD53XX_CMD_SPECIAL | AD53XX_SPECIAL_READ | op |
|
return (AD53XX_CMD_SPECIAL | AD53XX_SPECIAL_READ | op |
|
||||||
(((channel & 0x3f) + 8) << 7))
|
((channel + 8) << 7))
|
||||||
|
|
||||||
|
|
||||||
@portable
|
@portable
|
||||||
|
|
Loading…
Reference in New Issue