Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
etherbone-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
hdl-core-lib
etherbone-core
Commits
d001126f
Commit
d001126f
authored
Apr 22, 2016
by
Wesley W. Terpstra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api: update c++ sdb methods
parent
0c5636fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
etherbone.h
api/etherbone.h
+11
-5
No files found.
api/etherbone.h
View file @
d001126f
...
...
@@ -635,10 +635,9 @@ typedef void (*sdb_callback2_t)(eb_user_data_t, eb_device_t device, const struct
EB_PUBLIC
eb_status_t
eb_sdb_scan_bus2
(
eb_device_t
device
,
const
struct
sdb_bridge
*
bridge
,
eb_address_t
msi_base
,
eb_user_data_t
data
,
sdb_callback2_t
cb
);
EB_PUBLIC
eb_status_t
eb_sdb_scan_root2
(
eb_device_t
device
,
eb_user_data_t
data
,
sdb_callback2_t
cb
);
/* These functions are deprecated, use the v2 versions above */
typedef
void
(
*
sdb_callback_t
)(
eb_user_data_t
,
eb_device_t
device
,
const
struct
sdb_table
*
,
eb_status_t
);
EB_PUBLIC
eb_status_t
eb_sdb_scan_bus
(
eb_device_t
device
,
const
struct
sdb_bridge
*
bridge
,
eb_user_data_t
data
,
sdb_callback_t
cb
)
EB_DEPRECATED
;
EB_PUBLIC
eb_status_t
eb_sdb_scan_root
(
eb_device_t
device
,
eb_user_data_t
data
,
sdb_callback_t
cb
)
EB_DEPRECATED
;
EB_PUBLIC
eb_status_t
eb_sdb_scan_root
(
eb_device_t
device
,
eb_user_data_t
data
,
sdb_callback_t
cb
);
/* Convenience methods for locating / identifying devices.
* These calls are blocking! If you need the power API, use the above methods.
...
...
@@ -758,9 +757,11 @@ class Device {
width_t
width
()
const
;
template
<
typename
T
>
EB_STATUS_OR_VOID_T
sdb_scan_bus
(
const
struct
sdb_bridge
*
bridge
,
T
*
user
,
sdb_callback
_t
);
EB_STATUS_OR_VOID_T
sdb_scan_bus
2
(
const
struct
sdb_bridge
*
bridge
,
eb_address_t
msi_base
,
T
*
user
,
sdb_callback2
_t
);
template
<
typename
T
>
EB_STATUS_OR_VOID_T
sdb_scan_root
(
T
*
user
,
sdb_callback_t
);
template
<
typename
T
>
EB_STATUS_OR_VOID_T
sdb_scan_root2
(
T
*
user
,
sdb_callback2_t
);
EB_STATUS_OR_VOID_T
sdb_find_by_address
(
eb_address_t
address
,
struct
sdb_device
*
output
);
EB_STATUS_OR_VOID_T
sdb_find_by_identity
(
uint64_t
vendor_id
,
uint32_t
device_id
,
std
::
vector
<
struct
sdb_device
>&
output
);
...
...
@@ -952,8 +953,8 @@ inline width_t Device::width() const {
}
template
<
typename
T
>
inline
EB_STATUS_OR_VOID_T
Device
::
sdb_scan_bus
(
const
struct
sdb_bridge
*
bridge
,
T
*
user
,
sdb_callback
_t
cb
)
{
EB_RETURN_OR_THROW
(
"Device::sdb_scan_bus
"
,
eb_sdb_scan_bus
(
device
,
bridg
e
,
user
,
cb
));
inline
EB_STATUS_OR_VOID_T
Device
::
sdb_scan_bus
2
(
const
struct
sdb_bridge
*
bridge
,
eb_address_t
msi_base
,
T
*
user
,
sdb_callback2
_t
cb
)
{
EB_RETURN_OR_THROW
(
"Device::sdb_scan_bus
2"
,
eb_sdb_scan_bus2
(
device
,
bridge
,
msi_bas
e
,
user
,
cb
));
}
template
<
typename
T
>
...
...
@@ -961,6 +962,11 @@ inline EB_STATUS_OR_VOID_T Device::sdb_scan_root(T* user, sdb_callback_t cb) {
EB_RETURN_OR_THROW
(
"Device::sdb_scan_root"
,
eb_sdb_scan_root
(
device
,
user
,
cb
));
}
template
<
typename
T
>
inline
EB_STATUS_OR_VOID_T
Device
::
sdb_scan_root2
(
T
*
user
,
sdb_callback2_t
cb
)
{
EB_RETURN_OR_THROW
(
"Device::sdb_scan_root2"
,
eb_sdb_scan_root2
(
device
,
user
,
cb
));
}
inline
EB_STATUS_OR_VOID_T
Device
::
sdb_find_by_address
(
eb_address_t
address
,
struct
sdb_device
*
output
)
{
EB_RETURN_OR_THROW
(
"Device::sdb_find_by_address"
,
eb_sdb_find_by_address
(
device
,
address
,
output
));
}
...
...
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