[Previous] [Contents] [Index] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

usbd_topology()

Get the USB bus physical topology

Synopsis:

#include <sys/usbdi.h>

int usbd_topology( struct usbd_connection *connection,
                   usbd_bus_topology_t *tp )

Description:

You use the usbd_topology() function to get the USB bus physical topology.


Note: For more information on USB bus topology, see sections 4.1.1 and 5.2.3 in the USB Specification v1.1.

Here are the parameters:

connection
An opaque handle that identifies the USB stack (from usbd_connect()).
tp
A pointer to the usbd_bus_topology_t data structure, which is filled in by usbd_topology().

The usbd_bus_topology_t structure contains at least the following:

typedef struct usbd_port_attachment {
    _uint8                    upstream_devno;
    _uint8                    upstream_port;
    _uint8                    upstream_port_speed;
} 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_attachments, one per device. Note that the upstream_devno field will contain a value other than 0xff to indicate a valid attachment.

Returns:

EOK
Success.
ENODEV
Device was removed.

Classification:

QNX Neutrino, QNX 4

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler No
Thread Yes

See also:

usbd_connect()


[Previous] [Contents] [Index] [Next]