Skip to content

Commit 7d9e605

Browse files
committedSep 6, 2017
cpu_interface: disable Rust warning for unused read_volatile/write_volatile imports
Some peripherals may be read-only or write-only, and the warnings cause noise.
1 parent 5b02c49 commit 7d9e605

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎misoc/integration/cpu_interface.py

+1
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ def get_csr_rust(regions, groups, constants):
225225
if not isinstance(obj, Memory):
226226
r += "\n"
227227
r += " pub mod "+name+" {\n"
228+
r += " #[allow(unused_imports)]\n"
228229
r += " use core::ptr::{read_volatile, write_volatile};\n\n"
229230
for csr in obj:
230231
nwords = (csr.size + busword - 1)//busword

0 commit comments

Comments
 (0)
Please sign in to comment.