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
92f4a90b
Commit
92f4a90b
authored
Feb 22, 2018
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Profbus and Profinet bugfix for Bigendian Bit32 channels with number > 15
parent
d29602e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
profibus/lib/rt/src/os_linux/rt_io_m_pb_dp_slave.c
profibus/lib/rt/src/os_linux/rt_io_m_pb_dp_slave.c
+3
-3
profibus/lib/rt/src/os_linux/rt_io_m_pndevice.cpp
profibus/lib/rt/src/os_linux/rt_io_m_pndevice.cpp
+3
-3
No files found.
profibus/lib/rt/src/os_linux/rt_io_m_pb_dp_slave.c
View file @
92f4a90b
...
...
@@ -232,7 +232,7 @@ static pwr_tStatus IoRackInit (
if
(
chan_di
->
Representation
==
pwr_eDataRepEnum_Bit16
&&
op
->
ByteOrdering
==
pwr_eByteOrderingEnum_BigEndian
)
chanp
->
mask
=
swap16
(
chanp
->
mask
);
if
(
chan_di
->
Representation
==
pwr_eDataRepEnum_Bit32
&&
op
->
ByteOrdering
==
pwr_eByteOrderingEnum_BigEndian
)
chanp
->
mask
=
swap32
(
(
unsigned
short
)
chanp
->
mask
);
chanp
->
mask
=
swap32
(
chanp
->
mask
);
if
(
chan_di
->
Number
==
0
)
latent_input_count
=
GetChanSize
(
chan_di
->
Representation
);
// printf("Di channel found in %s, Number %d, Offset %d\n", cardp->Name, chan_di->Number, chanp->offset);
break
;
...
...
@@ -280,7 +280,7 @@ static pwr_tStatus IoRackInit (
if
(
chan_do
->
Representation
==
pwr_eDataRepEnum_Bit16
&&
op
->
ByteOrdering
==
pwr_eByteOrderingEnum_BigEndian
)
chanp
->
mask
=
swap16
(
chanp
->
mask
);
if
(
chan_do
->
Representation
==
pwr_eDataRepEnum_Bit32
&&
op
->
ByteOrdering
==
pwr_eByteOrderingEnum_BigEndian
)
chanp
->
mask
=
swap32
(
(
unsigned
short
)
chanp
->
mask
);
chanp
->
mask
=
swap32
(
chanp
->
mask
);
if
(
chan_do
->
Number
==
0
)
latent_output_count
=
GetChanSize
(
chan_do
->
Representation
);
// printf("Do channel found in %s, Number %d, Offset %d\n", cardp->Name, chan_do->Number, chanp->offset);
break
;
...
...
@@ -426,4 +426,4 @@ pwr_dExport pwr_BindIoMethods(Pb_DP_Slave) = {
pwr_BindIoMethod
(
IoRackWrite
),
pwr_BindIoMethod
(
IoRackClose
),
pwr_NullMethod
};
\ No newline at end of file
};
profibus/lib/rt/src/os_linux/rt_io_m_pndevice.cpp
View file @
92f4a90b
...
...
@@ -139,7 +139,7 @@ static pwr_tStatus IoRackInit (
if
(
chan_di
->
Representation
==
pwr_eDataRepEnum_Bit16
&&
op
->
ByteOrdering
==
pwr_eByteOrderingEnum_BigEndian
)
chanp
->
mask
=
swap16
(
chanp
->
mask
);
if
(
chan_di
->
Representation
==
pwr_eDataRepEnum_Bit32
&&
op
->
ByteOrdering
==
pwr_eByteOrderingEnum_BigEndian
)
chanp
->
mask
=
swap32
(
(
unsigned
short
)
chanp
->
mask
);
chanp
->
mask
=
swap32
(
chanp
->
mask
);
if
(
chan_di
->
Number
==
0
)
latent_input_count
=
GetChanSize
((
pwr_eDataRepEnum
)
chan_di
->
Representation
);
// printf("Di channel found in %s, Number %d, Offset %d\n", cardp->Name, chan_di->Number, chanp->offset);
break
;
...
...
@@ -187,7 +187,7 @@ static pwr_tStatus IoRackInit (
if
(
chan_do
->
Representation
==
pwr_eDataRepEnum_Bit16
&&
op
->
ByteOrdering
==
pwr_eByteOrderingEnum_BigEndian
)
chanp
->
mask
=
swap16
(
chanp
->
mask
);
if
(
chan_do
->
Representation
==
pwr_eDataRepEnum_Bit32
&&
op
->
ByteOrdering
==
pwr_eByteOrderingEnum_BigEndian
)
chanp
->
mask
=
swap32
(
(
unsigned
short
)
chanp
->
mask
);
chanp
->
mask
=
swap32
(
chanp
->
mask
);
if
(
chan_do
->
Number
==
0
)
latent_output_count
=
GetChanSize
((
pwr_eDataRepEnum
)
chan_do
->
Representation
);
// printf("Do channel found in %s, Number %d, Offset %d\n", cardp->Name, chan_do->Number, chanp->offset);
break
;
...
...
@@ -345,4 +345,4 @@ pwr_dExport pwr_BindIoMethods(PnDevice) = {
pwr_BindIoMethod
(
IoRackWrite
),
pwr_BindIoMethod
(
IoRackClose
),
pwr_NullMethod
};
\ No newline at end of file
};
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