dma: call rtio module to get time cursor position
More portable across RTIO implementations.
This commit is contained in:
parent
7f4ccc9ded
commit
c9bac028bf
@ -197,7 +197,7 @@ unsafe fn dma_record_output_prepare(timestamp: i64, target: i32,
|
||||
|
||||
pub extern fn dma_record_output(target: i32, word: i32) {
|
||||
unsafe {
|
||||
let timestamp = csr::rtio::now_read() as i64;
|
||||
let timestamp = rtio::now_mu();
|
||||
let data = dma_record_output_prepare(timestamp, target, 1);
|
||||
data.copy_from_slice(&[
|
||||
(word >> 0) as u8,
|
||||
@ -212,7 +212,7 @@ pub extern fn dma_record_output_wide(target: i32, words: CSlice<i32>) {
|
||||
assert!(words.len() <= 16); // enforce the hardware limit
|
||||
|
||||
unsafe {
|
||||
let timestamp = csr::rtio::now_read() as i64;
|
||||
let timestamp = rtio::now_mu();
|
||||
let mut data = dma_record_output_prepare(timestamp, target, words.len());
|
||||
for word in words.as_ref().iter() {
|
||||
data[..4].copy_from_slice(&[
|
||||
|
Loading…
Reference in New Issue
Block a user