From 0323946ffbbc1f87579a64bb6e3bb9ca736732e3 Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Thu, 18 May 2023 11:49:52 +0100 Subject: [PATCH] Fix mismatched signatures for the wide interface Lists are passed by-reference from python code, and so should be &CSlice<_> not CSlice<_>. Signed-off-by: Jonathan Coates --- artiq/firmware/ksupport/lib.rs | 2 +- artiq/firmware/ksupport/rtio.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/firmware/ksupport/lib.rs b/artiq/firmware/ksupport/lib.rs index d9786ae3c..7ca349f0d 100644 --- a/artiq/firmware/ksupport/lib.rs +++ b/artiq/firmware/ksupport/lib.rs @@ -342,7 +342,7 @@ extern fn dma_record_output(target: i32, word: i32) { } #[unwind(aborts)] -extern fn dma_record_output_wide(target: i32, words: CSlice) { +extern fn dma_record_output_wide(target: i32, words: &CSlice) { assert!(words.len() <= 16); // enforce the hardware limit unsafe { diff --git a/artiq/firmware/ksupport/rtio.rs b/artiq/firmware/ksupport/rtio.rs index d9f568f75..9bc92731a 100644 --- a/artiq/firmware/ksupport/rtio.rs +++ b/artiq/firmware/ksupport/rtio.rs @@ -89,7 +89,7 @@ mod imp { } } - pub extern fn output_wide(target: i32, data: CSlice) { + pub extern fn output_wide(target: i32, data: &CSlice) { unsafe { csr::rtio::target_write(target as u32); // writing target clears o_data @@ -235,7 +235,7 @@ mod imp { unimplemented!("not(has_rtio)") } - pub extern fn output_wide(_target: i32, _data: CSlice) { + pub extern fn output_wide(_target: i32, _data: &CSlice) { unimplemented!("not(has_rtio)") }