Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wishbone-gen
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
hdl-core-lib
wishbone-gen
Commits
42f285a3
Commit
42f285a3
authored
Nov 27, 2013
by
Benoit Rat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
c_headers: correct bug with multiline description when using extended flag
parent
6afdacf9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
cgen_c_headers.lua
cgen_c_headers.lua
+3
-3
No files found.
cgen_c_headers.lua
View file @
42f285a3
...
...
@@ -34,7 +34,7 @@ function cgen_c_field_define(field, reg, index)
emit
(
string.format
(
"%-45s %d"
,
"#define "
..
prefix
..
"_INDEX"
,
index
));
emit
(
string.format
(
"%-45s %s"
,
"#define "
..
prefix
..
"_PREFIX"
,
"
\"
"
..
field
.
c_prefix
..
"
\"
"
));
emit
(
string.format
(
"%-45s %s"
,
"#define "
..
prefix
..
"_NAME"
,
"
\"
"
..
field
.
name
..
"
\"
"
));
emit
(
string.format
(
"%-45s %s"
,
"#define "
..
prefix
..
"_DESC"
,
"WBGEN2_DESC(\""..field.description.."
\
")"
));
emit
(
string.format
(
"%-45s %s"
,
"#define "
..
prefix
..
"_DESC"
,
"WBGEN2_DESC(\""..field.description
:gsub("
\
n
.
*
", "")
.."
\
")"
));
emit
(
string.format
(
"%-45s %s"
,
"#define "
..
prefix
..
"_ACCESS"
,
"WBGEN2_"
..
rw_table
[
field
.
access_bus
]));
end
...
...
@@ -211,7 +211,7 @@ function cgen_c_defines()
if
(
options
.
c_reg_style
==
"extended"
)
then
emit
(
string.format
(
"%-45s %s"
,
"#define "
..
prefix
..
"_PREFIX"
,
"
\"
"
..
reg
.
c_prefix
..
"
\"
"
));
emit
(
string.format
(
"%-45s %s"
,
"#define "
..
prefix
..
"_NAME"
,
"
\"
"
..
reg
.
name
..
"
\"
"
));
emit
(
string.format
(
"%-45s %s"
,
"#define "
..
prefix
..
"_DESC"
,
"WBGEN2_DESC(\""..reg.description.."
\
")"
));
emit
(
string.format
(
"%-45s %s"
,
"#define "
..
prefix
..
"_DESC"
,
"WBGEN2_DESC(\""..reg.description
:gsub("
\
n
.
*
", "")
.."
\
")"
));
end
emit
(
string.format
(
"%-45s %s"
,
"#define "
..
string.upper
(
periph
.
c_prefix
)
..
"_REG_"
..
string.upper
(
reg
.
c_prefix
),
string.format
(
"0x%08x"
,
reg
.
base
*
DATA_BUS_WIDTH
/
8
)));
...
...
@@ -237,7 +237,7 @@ function cgen_generate_c_header_code()
emit
(
""
);
emit
(
string.format
(
"%-45s %s"
,
"#define "
..
string.upper
(
periph
.
c_prefix
)
..
"_PERIPH_PREFIX"
,
"
\"
"
..
periph
.
c_prefix
..
"
\"
"
));
emit
(
string.format
(
"%-45s %s"
,
"#define "
..
string.upper
(
periph
.
c_prefix
)
..
"_PERIPH_NAME"
,
"
\"
"
..
periph
.
name
..
"
\"
"
));
emit
(
string.format
(
"%-45s %s"
,
"#define "
..
string.upper
(
periph
.
c_prefix
)
..
"_PERIPH_DESC"
,
"WBGEN2_DESC(\""..periph.description.."
\
")"
));
emit
(
string.format
(
"%-45s %s"
,
"#define "
..
string.upper
(
periph
.
c_prefix
)
..
"_PERIPH_DESC"
,
"WBGEN2_DESC(\""..periph.description
:gsub("
\
n
.
*
", "")
.."
\
")"
));
emit
(
"
\n
#endif"
);
cgen_write_current_snippet
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment