misoclib/soc: fix add_constant when used for strings
This commit is contained in:
parent
a4808ace6f
commit
bedf3ed9a6
|
@ -98,7 +98,10 @@ def get_csr_header(regions, constants, with_access_functions=True):
|
||||||
for name, value in constants:
|
for name, value in constants:
|
||||||
r += "#define " + name
|
r += "#define " + name
|
||||||
if value is not None:
|
if value is not None:
|
||||||
r += " " + str(value)
|
if isinstance(value, str):
|
||||||
|
r += " \"" + value + "\""
|
||||||
|
else:
|
||||||
|
r += " " + str(value)
|
||||||
r += "\n"
|
r += "\n"
|
||||||
|
|
||||||
r += "\n#endif\n"
|
r += "\n#endif\n"
|
||||||
|
|
Loading…
Reference in New Issue