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
e5d82fc9
Commit
e5d82fc9
authored
Mar 26, 2018
by
Paolo Baesso
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor change in Si5345 to add verbose functionality during configuratioN
parent
816f2e27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
si5345.py
packages/si5345.py
+5
-3
No files found.
packages/si5345.py
View file @
e5d82fc9
...
...
@@ -87,7 +87,7 @@ class si5345:
self
.
i2c
.
write
(
self
.
slaveaddr
,
myaddr
,
mystop
)
#time.sleep(0.1)
res
=
self
.
i2c
.
read
(
self
.
slaveaddr
,
nwords
)
print
" Si5345 EPROM: "
print
" Si5345 E
E
PROM: "
result
=
"
\t
"
for
iaddr
in
reversed
(
res
):
result
+=
"
%#02
x "
%
(
iaddr
)
...
...
@@ -119,7 +119,7 @@ class si5345:
print
"
\t
"
,
len
(
regSettingList
),
"elements"
return
regSettingList
def
writeConfiguration
(
self
,
regSettingList
):
def
writeConfiguration
(
self
,
regSettingList
,
verbose
=
0
):
print
" Si5345 Writing configuration:"
#regSettingList= list(regSettingCsv)
counter
=
0
...
...
@@ -127,9 +127,11 @@ class si5345:
regAddr
=
int
(
item
[
0
],
16
)
regData
=
[
0
]
regData
[
0
]
=
int
(
item
[
1
],
16
)
print
"
\t
"
,
counter
,
"Reg:"
,
hex
(
regAddr
),
"Data:"
,
regData
if
verbose
:
print
"
\t
"
,
counter
,
"Reg:"
,
hex
(
regAddr
),
"Data:"
,
regData
counter
+=
1
self
.
writeRegister
(
regAddr
,
regData
,
False
)
print
"
\t
Si5345 configuration done"
def
checkDesignID
(
self
):
regAddr
=
0x026B
...
...
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