From d4f074b1e162c80f3440fbdd6ea2b264bf72efb2 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 17 May 2018 16:02:21 +0800 Subject: [PATCH] firmware: fix Allaki addressing. Closes #993 --- artiq/firmware/libboard_artiq/hmc542.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/firmware/libboard_artiq/hmc542.rs b/artiq/firmware/libboard_artiq/hmc542.rs index 509bc148c..fed25a78e 100644 --- a/artiq/firmware/libboard_artiq/hmc542.rs +++ b/artiq/firmware/libboard_artiq/hmc542.rs @@ -11,7 +11,7 @@ const CHANNELS: usize = 2; fn set_pins(card_index: usize, chan_index: usize, pins: u32) { let pins = pins ^ PIN_RST_N; - let shift = card_index * 2 + chan_index; + let shift = (card_index * 2 + chan_index)*4; unsafe { let state = csr::allaki_atts::out_read(); let state = state & !(0xf << shift);