Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EtherBone Core
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
EtherBone Core
Commits
66dbfc6a
Commit
66dbfc6a
authored
12 years ago
by
Wesley W. Terpstra
Browse files
Options
Downloads
Patches
Plain Diff
The C++ and C API had their parameters flipped respectively.
Be consistent!
parent
bf9c51d9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/etherbone.h
+4
-4
4 additions, 4 deletions
api/etherbone.h
api/test/loopback.cpp
+2
-2
2 additions, 2 deletions
api/test/loopback.cpp
with
6 additions
and
6 deletions
api/etherbone.h
+
4
−
4
View file @
66dbfc6a
...
...
@@ -552,7 +552,7 @@ class Device {
eb_device_t
device
;
friend
class
Cycle
;
template
<
typename
T
,
void
(
T
::*
cb
)(
Operation
,
Device
,
status_t
)>
template
<
typename
T
,
void
(
T
::*
cb
)(
Device
,
Operation
,
status_t
)>
friend
void
proxy_cb
(
T
*
object
,
eb_device_t
dev
,
eb_operation_t
op
,
eb_status_t
status
);
};
...
...
@@ -604,14 +604,14 @@ class Operation {
eb_operation_t
operation
;
template
<
typename
T
,
void
(
T
::*
cb
)(
Operation
,
Device
,
status_t
)>
template
<
typename
T
,
void
(
T
::*
cb
)(
Device
,
Operation
,
status_t
)>
friend
void
proxy_cb
(
T
*
object
,
eb_device_t
dev
,
eb_operation_t
op
,
eb_status_t
status
);
};
/* Convenience templates to convert member functions into callback type */
template
<
typename
T
,
void
(
T
::*
cb
)(
Operation
,
Device
,
status_t
)>
template
<
typename
T
,
void
(
T
::*
cb
)(
Device
,
Operation
,
status_t
)>
inline
void
proxy_cb
(
T
*
object
,
eb_device_t
dev
,
eb_operation_t
op
,
eb_status_t
status
)
{
return
(
object
->*
cb
)(
Operation
(
op
),
Device
(
dev
),
status
);
return
(
object
->*
cb
)(
Device
(
dev
),
Operation
(
op
),
status
);
}
/****************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
api/test/loopback.cpp
+
2
−
2
View file @
66dbfc6a
...
...
@@ -204,10 +204,10 @@ public:
int
*
success
;
void
launch
(
Device
device
,
int
length
,
int
*
success
);
void
complete
(
Operation
op
,
Device
dev
,
status_t
status
);
void
complete
(
Device
dev
,
Operation
op
,
status_t
status
);
};
void
TestCycle
::
complete
(
Operation
op
,
Device
dev
,
status_t
status
)
{
void
TestCycle
::
complete
(
Device
dev
,
Operation
op
,
status_t
status
)
{
#ifndef EB_TEST_TCP
if
(
status
==
EB_OVERFLOW
)
{
if
(
loud
)
printf
(
"Skipping overflow cycle
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment