Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ddk_en/usb/usbd_topology.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ddk_en/usb/usbd_topology.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ddk_en/usb/usbd_topology.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ddk_en/usb/usbd_topology.html on line 8
Get the USB bus physical topology
#include <sys/usbdi.h>
int usbd_topology( struct usbd_connection *connection,
usbd_bus_topology_t *tp )
int usbd_topology_ext( struct usbd_connection *connection,
_uint8 busno,
usbd_bus_topology_t *tp )
- connection
- An opaque handle that identifies the USB stack, obtained by calling
usbd_connect().
- bus
- (usbd_topology_ext() only)
The index of the bus that you want the topology for.
- tp
- A pointer to a usbd_bus_topology_t data structure
that this function fills in; see below.
libusbdi
You can use the usbd_topology() or usbd_topology_ext()
function to get the
USB bus physical topology.
|
For more information on USB bus topology, see sections 4.1.1
and 5.2.3 in the USB Specification v1.1. |
If your system has more than one bus, you can call
usbd_topology_ext() to get information about a specific one.
The usbd_topology() function gets information about the first
bus; calling it is the same as calling usbd_topology()
with a bus argument of 0.
The usbd_bus_topology_t structure is defined as follows:
typedef struct usbd_port_attachment {
_uint8 upstream_devno;
_uint8 upstream_port;
_uint8 upstream_port_speed;
_uint8 upstream_hc;
_uint8 _reserved[4];
} usbd_port_attachment_t;
typedef struct usbd_bus_topology {
usbd_port_attachment_t ports[64];
} usbd_bus_topology_t;
The structure contains an array of
usb_port_attachment_t structures, one per device.
The usb_port_attachment_t structure contains at
least the following:
- upstream_devno
- The device number of the upstream hub (0 if it's a root port).
- upstream_port
- The port number the device is connected to.
- upstream_port_speed
- The port speed that the device is operating at; one of the following:
- 0 — full
- 1 — low
- 2 — high
- upstream_hc
- The bus or host controller that the device is connected to.
|
The upstream_devno field will contain a
value other than 0xff to indicate a valid
attachment. |
- EOK
- Success.
- ENODEV
- The device was removed.
QNX Neutrino, QNX 4
Safety: | |
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
usbd_connect()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ddk_en/usb/usbd_topology.html on line 215
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ddk_en/usb/usbd_topology.html on line 215