Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
x393
Commits
6c5ee926
Commit
6c5ee926
authored
Nov 22, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made trigger-realted parameters to run through the sequencer too, continued more
parent
5125b897
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
x393_export_c.py
py393/x393_export_c.py
+3
-2
No files found.
py393/x393_export_c.py
View file @
6c5ee926
...
@@ -1409,6 +1409,7 @@ class X393ExportC(object):
...
@@ -1409,6 +1409,7 @@ class X393ExportC(object):
isGenAbs
=
False
):
isGenAbs
=
False
):
# name, var_name, address, address_inc, var_range, data_type, rw, comment = define_tuple
# name, var_name, address, address_inc, var_range, data_type, rw, comment = define_tuple
name
,
var_name
,
address
,
address_inc
,
_
,
data_type
,
rw
,
comment
=
define_tuple
name
,
var_name
,
address
,
address_inc
,
_
,
data_type
,
rw
,
comment
=
define_tuple
use_address_inc
=
address_inc
or
isGenRel
or
isGenAbs
# so address_inc ==0 will work for TRIG_ parameters
multivar
=
isinstance
(
address_inc
,(
list
,
tuple
))
# var_name, var_range are also lists/tuples of the same length
multivar
=
isinstance
(
address_inc
,(
list
,
tuple
))
# var_name, var_range are also lists/tuples of the same length
stops
=
frmt_spcs
[(
'declare'
,
'define'
)[
isDefine
]]
stops
=
frmt_spcs
[(
'declare'
,
'define'
)[
isDefine
]]
#TODO: add optional argument range check?
#TODO: add optional argument range check?
...
@@ -1431,7 +1432,7 @@ class X393ExportC(object):
...
@@ -1431,7 +1432,7 @@ class X393ExportC(object):
args
+=
', int '
+
vn
.
lower
()
args
+=
', int '
+
vn
.
lower
()
else
:
else
:
arg
=
var_name
.
lower
()
arg
=
var_name
.
lower
()
if
arg
and
address_inc
:
if
arg
and
use_
address_inc
:
args
+=
', int '
+
arg
args
+=
', int '
+
arg
s
=
"void "
s
=
"void "
s
=
self
.
str_tab_stop
(
s
,
stops
[
0
])
s
=
self
.
str_tab_stop
(
s
,
stops
[
0
])
...
@@ -1476,7 +1477,7 @@ class X393ExportC(object):
...
@@ -1476,7 +1477,7 @@ class X393ExportC(object):
else
:
else
:
s
+=
'{writel(
%
s, mmio_ptr + '
%
(
td
)
s
+=
'{writel(
%
s, mmio_ptr + '
%
(
td
)
if
address_inc
:
if
use_
address_inc
:
s
+=
'(0x
%04
x'
%
(
address
)
s
+=
'(0x
%04
x'
%
(
address
)
if
multivar
:
if
multivar
:
for
vn
,
vi
in
zip
(
var_name
,
address_inc
):
for
vn
,
vi
in
zip
(
var_name
,
address_inc
):
...
...
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