diff --git a/src/libboard_artiq/src/drtioaux.rs b/src/libboard_artiq/src/drtioaux.rs index 4971502..1e2534a 100644 --- a/src/libboard_artiq/src/drtioaux.rs +++ b/src/libboard_artiq/src/drtioaux.rs @@ -66,6 +66,13 @@ pub fn copy_work_buffer(src: *mut u16, dst: *mut u16, len: isize) { *dst.offset(i) = *src.offset(i); *dst.offset(i+1) = *src.offset(i+1); } + // workaround for corrupted writes + // check and re-write + for i in 0..len { + if *dst.offset(i) != *src.offset(i) { + *dst.offset(i) = *src.offset(i); + } + } } }