Skip to content

Commit

Permalink
Rust CSR: mark all remaining consts as pub.
Browse files Browse the repository at this point in the history
whitequark committed Sep 29, 2016
1 parent 806125b commit 20fdb77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions misoc/integration/cpu_interface.py
Original file line number Diff line number Diff line change
@@ -190,7 +190,7 @@ def get_csr_rust(regions, constants, with_access_functions=True):
r += "pub mod csr {\n"

for name, origin, busword, obj in regions:
r += " const "+name.upper()+"_BASE: *mut u32 = "+hex(origin)+" as *mut u32;\n"
r += " pub const "+name.upper()+"_BASE: *mut u32 = "+hex(origin)+" as *mut u32;\n"
if not isinstance(obj, Memory):
r += "\n"
r += " pub mod "+name+" {\n"
@@ -209,7 +209,7 @@ def get_csr_rust(regions, constants, with_access_functions=True):
else:
value = str(value)
rstype = "u32"
r += " const "+name.upper()+": "+rstype+" = "+value+";\n"
r += " pub const "+name.upper()+": "+rstype+" = "+value+";\n"

r += "}\n"
return r

0 comments on commit 20fdb77

Please sign in to comment.