Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
AIDA-2020 TLU - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
AIDA-2020 TLU - Software
Commits
def00b7c
Commit
def00b7c
authored
Mar 29, 2018
by
Paolo Baesso
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added progress bar to configuration. Only active if verbose is set to 1.
parent
d0005970
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
si5345.py
packages/si5345.py
+11
-1
No files found.
packages/si5345.py
View file @
def00b7c
...
...
@@ -3,6 +3,7 @@ import uhal
from
I2CuHal
import
I2CCore
import
StringIO
import
csv
import
sys
class
si5345
:
#Class to configure the Si5344 clock generator
...
...
@@ -121,16 +122,25 @@ class si5345:
def
writeConfiguration
(
self
,
regSettingList
,
verbose
=
0
):
print
" Si5345 Writing configuration:"
toolbar_width
=
38
if
(
verbose
==
1
):
sys
.
stdout
.
write
(
" [
%
s]"
%
(
" "
*
toolbar_width
))
sys
.
stdout
.
flush
()
sys
.
stdout
.
write
(
"
\b
"
*
(
toolbar_width
+
1
))
# return to start of line, after '['
#regSettingList= list(regSettingCsv)
counter
=
0
for
item
in
regSettingList
:
regAddr
=
int
(
item
[
0
],
16
)
regData
=
[
0
]
regData
[
0
]
=
int
(
item
[
1
],
16
)
if
verbose
:
if
(
verbose
>
1
)
:
print
"
\t
"
,
counter
,
"Reg:"
,
hex
(
regAddr
),
"Data:"
,
regData
counter
+=
1
self
.
writeRegister
(
regAddr
,
regData
,
False
)
if
(
not
(
counter
%
10
)
and
(
verbose
==
1
)):
sys
.
stdout
.
write
(
"-"
)
sys
.
stdout
.
flush
()
sys
.
stdout
.
write
(
"
\n
"
)
print
"
\t
Si5345 configuration done"
def
checkDesignID
(
self
):
...
...
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