Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL RS485 - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
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
Conv TTL RS485 - Testing
Commits
ffba3aca
Commit
ffba3aca
authored
Nov 11, 2014
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw: leds.py clears LED test bits on exit
parent
8a67d16a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
leds.py
pts/python/leds.py
+13
-2
No files found.
pts/python/leds.py
View file @
ffba3aca
...
...
@@ -75,7 +75,9 @@ def main(bus,tname,inf,log):
try
:
# First phase of LED test, enable pulse LED sequencing
bus
.
vv_write
(
CSR
,
1
<<
CSR_FRONT_LED_EN_OFS
)
val
=
bus
.
vv_read
(
CSR
)
val
|=
(
1
<<
CSR_FRONT_LED_EN_OFS
)
bus
.
vv_write
(
CSR
,
val
)
# The gateware should blink the LEDs, ask the operator for input
inp
=
raw_input
(
"--> Are the channel LEDs blinking one by one? yes/no: "
)
...
...
@@ -91,7 +93,9 @@ def main(bus,tname,inf,log):
inp
=
raw_input
(
'Please type "yes" or "no" to continue:'
)
# Second phase of LED test, enable status LED sequencing
bus
.
vv_write
(
CSR
,
1
<<
CSR_STAT_LED_EN_OFS
)
val
&=
~
(
1
<<
CSR_FRONT_LED_EN_OFS
)
val
|=
1
<<
CSR_STAT_LED_EN_OFS
bus
.
vv_write
(
CSR
,
val
)
# The gateware should blink the LEDs, ask the operator for input
inp
=
raw_input
(
"--> Are the status LEDs blinking one by one? yes/no: "
)
...
...
@@ -113,3 +117,10 @@ def main(bus,tname,inf,log):
except
BusWarning
,
e
:
raise
PtsError
(
"SKT Warning:
%
s"
%
(
e
))
finally
:
# Clean-up -- clear status and front LED test bits
val
=
bus
.
vv_read
(
CSR
)
val
&=
~
((
1
<<
CSR_FRONT_LED_EN_OFS
)
|
(
1
<<
CSR_STAT_LED_EN_OFS
))
bus
.
vv_write
(
CSR
,
val
)
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