forked from M-Labs/artiq-zynq
silence static mut ref warns
This commit is contained in:
parent
0d54457543
commit
744e097505
@ -60,6 +60,7 @@ impl BufferLogger {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(static_mut_refs)]
|
||||
pub unsafe fn get_logger() -> &'static mut Option<BufferLogger> {
|
||||
&mut LOGGER
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
#![allow(static_mut_refs)]
|
||||
|
||||
use crate::artiq_raise;
|
||||
|
||||
|
@ -23,6 +23,7 @@ pub struct DmaRecorder {
|
||||
|
||||
static mut RECORDER: Option<DmaRecorder> = None;
|
||||
|
||||
#[allow(static_mut_refs)]
|
||||
pub unsafe fn init_dma_recorder() {
|
||||
// as static would remain after restart, we have to reset it,
|
||||
// without running its destructor.
|
||||
@ -80,6 +81,7 @@ pub extern "C" fn dma_record_stop(duration: i64, enable_ddma: bool) {
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
#[allow(static_mut_refs)]
|
||||
unsafe fn dma_record_output_prepare(timestamp: i64, target: i32, words: usize) {
|
||||
// See gateware/rtio/dma.py.
|
||||
const HEADER_LENGTH: usize = /*length*/ 1 + /*channel*/3 + /*timestamp*/8 + /*address*/1;
|
||||
@ -117,6 +119,7 @@ pub extern "C" fn dma_record_output(target: i32, word: i32) {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(static_mut_refs)]
|
||||
pub extern "C" fn dma_record_output_wide(target: i32, words: &CSlice<i32>) {
|
||||
assert!(words.len() <= 16); // enforce the hardware limit
|
||||
|
||||
|
@ -151,6 +151,7 @@ fn _resolve_channel_name(channel: u32, device_map: &BTreeMap<u32, String>) -> St
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(static_mut_refs)]
|
||||
pub fn resolve_channel_name(channel: u32) -> String {
|
||||
_resolve_channel_name(channel, unsafe { &RTIO_DEVICE_MAP })
|
||||
}
|
||||
|
@ -442,6 +442,7 @@ fn set_fclk0_freq(clk: RtioClock, cfg: &Config) {
|
||||
);
|
||||
}
|
||||
|
||||
#[allow(static_mut_refs)]
|
||||
pub fn init(timer: &mut GlobalTimer, cfg: &Config) {
|
||||
let clk = get_rtio_clock_cfg(cfg);
|
||||
#[cfg(has_si5324)]
|
||||
|
Loading…
Reference in New Issue
Block a user