From 3ca47537b805b90d6c944daa44d8fb8356bef517 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 0c949f2b2..685516e2b 100644 --- a/artiq/firmware/ksupport/lib.rs +++ b/artiq/firmware/ksupport/lib.rs @@ -343,7 +343,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 b0168ba03..18cd9b11d 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)") }