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
09c197b6
Commit
09c197b6
authored
May 09, 2012
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PSS9000 IO, fix for 16 channel di and do cards
parent
088d7e6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
15 deletions
+19
-15
ssabox/lib/rt/src/os_linux/rt_io_m_di_dix2.c
ssabox/lib/rt/src/os_linux/rt_io_m_di_dix2.c
+10
-8
ssabox/lib/rt/src/os_linux/rt_io_m_do_hvdo32.c
ssabox/lib/rt/src/os_linux/rt_io_m_do_hvdo32.c
+9
-7
No files found.
ssabox/lib/rt/src/os_linux/rt_io_m_di_dix2.c
View file @
09c197b6
...
...
@@ -87,15 +87,16 @@ static pwr_tStatus IoCardInit (
io_sCard
*
cp
)
{
pwr_sClass_Di_DIX2
*
op
;
pwr_sClass_Di_DIX2
*
op
=
(
pwr_sClass_Di_DIX2
*
)
cp
->
op
;
int
words
=
op
->
MaxNoOfChannels
<=
16
?
1
:
2
;
io_sLocal
*
local
;
int
i
,
j
;
io_sRackLocal
*
r_local
=
(
io_sRackLocal
*
)(
rp
->
Local
);
op
=
(
pwr_sClass_Di_DIX2
*
)
cp
->
op
;
local
=
calloc
(
1
,
sizeof
(
*
local
));
cp
->
Local
=
local
;
errh_Info
(
"Init of di card '%s'"
,
cp
->
Name
);
local
->
Address
[
0
]
=
op
->
RegAddress
;
...
...
@@ -103,7 +104,7 @@ static pwr_tStatus IoCardInit (
local
->
Qbus_fp
=
r_local
->
Qbus_fp
;
/* Init filter */
for
(
i
=
0
;
i
<
2
;
i
++
)
for
(
i
=
0
;
i
<
words
;
i
++
)
{
/* The filter handles one 16-bit word */
for
(
j
=
0
;
j
<
16
;
j
++
)
...
...
@@ -128,13 +129,15 @@ static pwr_tStatus IoCardClose (
{
io_sLocal
*
local
;
int
i
;
pwr_sClass_Di_DIX2
*
op
=
(
pwr_sClass_Di_DIX2
*
)
cp
->
op
;
int
words
=
op
->
MaxNoOfChannels
<=
16
?
1
:
2
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
errh_Info
(
"IO closing di card '%s'"
,
cp
->
Name
);
/* Free filter data */
for
(
i
=
0
;
i
<
2
;
i
++
)
for
(
i
=
0
;
i
<
words
;
i
++
)
{
if
(
local
->
Filter
[
i
].
Found
)
io_CloseDiFilter
(
local
->
Filter
[
i
].
Data
);
...
...
@@ -158,7 +161,6 @@ static pwr_tStatus IoCardRead (
io_sLocal
*
local
=
(
io_sLocal
*
)
cp
->
Local
;
io_sRackLocal
*
r_local
=
(
io_sRackLocal
*
)(
rp
->
Local
);
pwr_tUInt16
data
=
0
;
pwr_sClass_Di_DIX2
*
op
;
pwr_sClass_Ssab_RemoteRack
*
rrp
;
pwr_tUInt16
invmask
;
pwr_tUInt16
convmask
;
...
...
@@ -167,10 +169,10 @@ static pwr_tStatus IoCardRead (
qbus_io_read
rb
;
int
bfb_error
=
0
;
pwr_tTime
now
;
pwr_sClass_Di_DIX2
*
op
=
(
pwr_sClass_Di_DIX2
*
)
cp
->
op
;
int
words
=
op
->
MaxNoOfChannels
<=
16
?
1
:
2
;
op
=
(
pwr_sClass_Di_DIX2
*
)
cp
->
op
;
for
(
i
=
0
;
i
<
2
;
i
++
)
for
(
i
=
0
;
i
<
words
;
i
++
)
{
if
(
i
==
0
)
{
...
...
ssabox/lib/rt/src/os_linux/rt_io_m_do_hvdo32.c
View file @
09c197b6
...
...
@@ -85,12 +85,12 @@ static pwr_tStatus IoCardInit (
io_sCard
*
cp
)
{
pwr_sClass_Do_HVDO32
*
op
;
pwr_sClass_Do_HVDO32
*
op
=
(
pwr_sClass_Do_HVDO32
*
)
cp
->
op
;
io_sLocal
*
local
;
int
i
,
j
;
io_sRackLocal
*
r_local
=
(
io_sRackLocal
*
)(
rp
->
Local
);
int
words
=
op
->
MaxNoOfChannels
<=
16
?
1
:
2
;
op
=
(
pwr_sClass_Do_HVDO32
*
)
cp
->
op
;
local
=
calloc
(
1
,
sizeof
(
*
local
));
cp
->
Local
=
local
;
...
...
@@ -101,7 +101,7 @@ static pwr_tStatus IoCardInit (
local
->
Qbus_fp
=
r_local
->
Qbus_fp
;
/* Init filter for Po signals */
for
(
i
=
0
;
i
<
2
;
i
++
)
for
(
i
=
0
;
i
<
words
;
i
++
)
{
/* The filter handles one 16-bit word */
for
(
j
=
0
;
j
<
16
;
j
++
)
...
...
@@ -128,13 +128,15 @@ static pwr_tStatus IoCardClose (
{
io_sLocal
*
local
;
int
i
;
pwr_sClass_Do_HVDO32
*
op
=
(
pwr_sClass_Do_HVDO32
*
)
cp
->
op
;
int
words
=
op
->
MaxNoOfChannels
<=
16
?
1
:
2
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
errh_Info
(
"IO closing do card '%s'"
,
cp
->
Name
);
/* Free filter data */
for
(
i
=
0
;
i
<
2
;
i
++
)
for
(
i
=
0
;
i
<
words
;
i
++
)
{
if
(
local
->
Filter
[
i
].
Found
)
io_ClosePoFilter
(
local
->
Filter
[
i
].
Data
);
...
...
@@ -158,7 +160,6 @@ static pwr_tStatus IoCardWrite (
io_sLocal
*
local
=
(
io_sLocal
*
)
cp
->
Local
;
io_sRackLocal
*
r_local
=
(
io_sRackLocal
*
)(
rp
->
Local
);
pwr_tUInt16
data
=
0
;
pwr_sClass_Do_HVDO32
*
op
;
pwr_tUInt16
invmask
;
pwr_tUInt16
testmask
;
pwr_tUInt16
testvalue
;
...
...
@@ -166,14 +167,15 @@ static pwr_tStatus IoCardWrite (
qbus_io_write
wb
;
int
sts
;
pwr_tTime
now
;
pwr_sClass_Do_HVDO32
*
op
=
(
pwr_sClass_Do_HVDO32
*
)
cp
->
op
;
int
words
=
op
->
MaxNoOfChannels
<=
16
?
1
:
2
;
op
=
(
pwr_sClass_Do_HVDO32
*
)
cp
->
op
;
#if defined(OS_ELN)
vaxc
$
establish
(
machfailwrite
);
#endif
for
(
i
=
0
;
i
<
2
;
i
++
)
for
(
i
=
0
;
i
<
words
;
i
++
)
{
if
(
i
==
1
&&
op
->
MaxNoOfChannels
<=
16
)
break
;
...
...
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