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
ce2cc715
Commit
ce2cc715
authored
Jan 11, 2011
by
Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Vellman K8055 communication timeout increased
parent
e890e971
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
otherio/lib/rt/src/os_linux/rt_io_m_velleman_k8055_board.c
otherio/lib/rt/src/os_linux/rt_io_m_velleman_k8055_board.c
+12
-3
No files found.
otherio/lib/rt/src/os_linux/rt_io_m_velleman_k8055_board.c
View file @
ce2cc715
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
#include "rt_io_m_usb_agent.h"
#include "rt_io_m_usb_agent.h"
#include "rt_io_m_velleman_k8055_board.h"
#include "rt_io_m_velleman_k8055_board.h"
static
int
last_usblib_sts
=
0
;
static
pwr_tStatus
IoCardInit
(
io_tCtx
ctx
,
static
pwr_tStatus
IoCardInit
(
io_tCtx
ctx
,
io_sAgent
*
ap
,
io_sAgent
*
ap
,
...
@@ -160,10 +161,14 @@ static pwr_tStatus IoCardRead( io_tCtx ctx,
...
@@ -160,10 +161,14 @@ static pwr_tStatus IoCardRead( io_tCtx ctx,
pwr_tUInt32
error_count
=
op
->
Super
.
ErrorCount
;
pwr_tUInt32
error_count
=
op
->
Super
.
ErrorCount
;
// You have to read twice to get the latest ?????
// You have to read twice to get the latest ?????
sts
=
libusb_interrupt_transfer
(
local
->
libusb_device
,
endpoint
,
data
,
8
,
&
tsize
,
2
0
);
sts
=
libusb_interrupt_transfer
(
local
->
libusb_device
,
endpoint
,
data
,
8
,
&
tsize
,
10
0
);
sts
=
libusb_interrupt_transfer
(
local
->
libusb_device
,
endpoint
,
data
,
8
,
&
tsize
,
2
0
);
sts
=
libusb_interrupt_transfer
(
local
->
libusb_device
,
endpoint
,
data
,
8
,
&
tsize
,
10
0
);
if
(
sts
!=
0
||
tsize
!=
size
)
{
if
(
sts
!=
0
||
tsize
!=
size
)
{
op
->
Super
.
ErrorCount
++
;
op
->
Super
.
ErrorCount
++
;
if
(
sts
!=
0
&&
sts
!=
last_usblib_sts
)
{
errh_Error
(
"K8055 libusb transfer error %d"
,
sts
);
last_usblib_sts
=
sts
;
}
return
IO__SUCCESS
;
return
IO__SUCCESS
;
}
}
else
{
else
{
...
@@ -278,9 +283,13 @@ static pwr_tStatus IoCardWrite( io_tCtx ctx,
...
@@ -278,9 +283,13 @@ static pwr_tStatus IoCardWrite( io_tCtx ctx,
}
}
}
}
sts
=
libusb_interrupt_transfer
(
local
->
libusb_device
,
endpoint
,
data
,
size
,
&
tsize
,
2
0
);
sts
=
libusb_interrupt_transfer
(
local
->
libusb_device
,
endpoint
,
data
,
size
,
&
tsize
,
10
0
);
if
(
sts
!=
0
||
tsize
!=
size
)
{
if
(
sts
!=
0
||
tsize
!=
size
)
{
op
->
Super
.
ErrorCount
++
;
op
->
Super
.
ErrorCount
++
;
if
(
sts
!=
0
&&
sts
!=
last_usblib_sts
)
{
errh_Error
(
"K8055 libusb transfer error %d"
,
sts
);
last_usblib_sts
=
sts
;
}
return
IO__SUCCESS
;
return
IO__SUCCESS
;
}
}
...
...
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