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
841b6972
Commit
841b6972
authored
Nov 12, 2014
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw: Added code for the failsafe condition A = '1', B = '1' in rs485_pulse.py
parent
18724f7a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
rs485_pulse.py
pts/python/rs485_pulse.py
+9
-1
No files found.
pts/python/rs485_pulse.py
View file @
841b6972
...
...
@@ -170,11 +170,19 @@ def main(bus, tname, inf, log):
check_counters
(
pc
,
inf
,
pel
)
clear_counters
(
pc
)
msg
=
"Testing
fail-saf
e"
msg
=
"Testing
RS-485 fail-safe on short-circuit cas
e"
print
(
msg
)
mux_sel
(
bus
,
0x3
)
inf
.
write
(
'
\n
'
)
inf
.
write
(
msg
+
'
\n
'
)
val
=
bus
.
vv_read
(
LSR
)
val
>>=
LSR_REARFS_OFS
if
(
val
==
0x3f
):
msg
=
"RS-485 failsafe lines read as expected: 0x
%02
X
\n
"
%
val
inf
.
write
(
msg
)
else
:
msg
=
"ERROR: Failsafe lines readout (0x
%02
X) incorrect - expected 0x3F"
%
val
pel
.
set
(
msg
)
return
pel
.
get
()
...
...
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