Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
0bf24834
Commit
0bf24834
authored
Dec 05, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Invert on works on do- and di-channels
parent
43be3ca9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
profibus/lib/rt/src/os_linux/rt_io_m_pb_module.c
profibus/lib/rt/src/os_linux/rt_io_m_pb_module.c
+10
-7
No files found.
profibus/lib/rt/src/os_linux/rt_io_m_pb_module.c
View file @
0bf24834
/*
* Proview $Id: rt_io_m_pb_module.c,v 1.
8 2007-10-08 13:43:1
0 claes Exp $
* Proview $Id: rt_io_m_pb_module.c,v 1.
9 2007-12-05 09:57:4
0 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -189,17 +189,20 @@ static pwr_tStatus IoCardRead (
case
pwr_eDataRepEnum_Bit8
:
udata8p
=
local
->
input_area
+
cp
->
offset
+
chanp
->
offset
;
*
(
pwr_tUInt16
*
)
(
chanp
->
vbp
)
=
((
*
udata8p
&
chanp
->
mask
)
!=
0
);
*
(
pwr_tUInt16
*
)
(
chanp
->
vbp
)
=
chan_di
->
InvertOn
?
((
*
udata8p
&
chanp
->
mask
)
==
0
)
:
((
*
udata8p
&
chanp
->
mask
)
!=
0
);
break
;
case
pwr_eDataRepEnum_Bit16
:
udata16p
=
local
->
input_area
+
cp
->
offset
+
chanp
->
offset
;
*
(
pwr_tUInt16
*
)
(
chanp
->
vbp
)
=
((
*
udata16p
&
chanp
->
mask
)
!=
0
);
*
(
pwr_tUInt16
*
)
(
chanp
->
vbp
)
=
chan_di
->
InvertOn
?
((
*
udata16p
&
chanp
->
mask
)
==
0
)
:
((
*
udata16p
&
chanp
->
mask
)
!=
0
);
break
;
case
pwr_eDataRepEnum_Bit32
:
udata32p
=
local
->
input_area
+
cp
->
offset
+
chanp
->
offset
;
*
(
pwr_tUInt16
*
)
(
chanp
->
vbp
)
=
((
*
udata32p
&
chanp
->
mask
)
!=
0
);
*
(
pwr_tUInt16
*
)
(
chanp
->
vbp
)
=
chan_di
->
InvertOn
?
((
*
udata32p
&
chanp
->
mask
)
==
0
)
:
((
*
udata32p
&
chanp
->
mask
)
!=
0
);
break
;
}
...
...
@@ -506,7 +509,7 @@ static pwr_tStatus IoCardWrite (
case
pwr_eDataRepEnum_Bit8
:
udata8p
=
local
->
output_area
+
cp
->
offset
+
chanp
->
offset
;
if
(
do_actval
!=
0
)
if
(
do_actval
^
chan_do
->
InvertOn
)
*
udata8p
|=
chanp
->
mask
;
else
*
udata8p
&=
~
chanp
->
mask
;
...
...
@@ -514,7 +517,7 @@ static pwr_tStatus IoCardWrite (
case
pwr_eDataRepEnum_Bit16
:
udata16p
=
local
->
output_area
+
cp
->
offset
+
chanp
->
offset
;
if
(
do_actval
!=
0
)
if
(
do_actval
^
chan_do
->
InvertOn
)
*
udata16p
|=
chanp
->
mask
;
else
*
udata16p
&=
~
chanp
->
mask
;
...
...
@@ -522,7 +525,7 @@ static pwr_tStatus IoCardWrite (
case
pwr_eDataRepEnum_Bit32
:
udata32p
=
local
->
output_area
+
cp
->
offset
+
chanp
->
offset
;
if
(
do_actval
!=
0
)
if
(
do_actval
^
chan_do
->
InvertOn
)
*
udata32p
|=
chanp
->
mask
;
else
*
udata32p
&=
~
chanp
->
mask
;
...
...
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