Skip to content

Commit

Permalink
cpu_interface: disable Rust warning for unused read_volatile/write_vo…
Browse files Browse the repository at this point in the history
…latile imports

Some peripherals may be read-only or write-only, and the warnings cause noise.
sbourdeauducq committed Sep 6, 2017
1 parent 5b02c49 commit 7d9e605
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions misoc/integration/cpu_interface.py
Original file line number Diff line number Diff line change
@@ -225,6 +225,7 @@ def get_csr_rust(regions, groups, constants):
if not isinstance(obj, Memory):
r += "\n"
r += " pub mod "+name+" {\n"
r += " #[allow(unused_imports)]\n"
r += " use core::ptr::{read_volatile, write_volatile};\n\n"
for csr in obj:
nwords = (csr.size + busword - 1)//busword

0 comments on commit 7d9e605

Please sign in to comment.