usbd_hcd_ext_info(), usbd_hcd_info()

Get information on the USB host controller and DDK library

Synopsis:

#include <sys/usbdi.h>

int usbd_hcd_ext_info( struct usbd_connection *connection,
                       uint32_t cindex,
                       usbd_hcd_info_t *info );

int usbd_hcd_info( struct usbd_connection *connection,
                   usbd_hcd_info_t *info );

Arguments:

connection
The handle for the connection to the USB stack, obtained by calling usbd_connect().
cindex
(usbd_hcd_ext_info() only) The index of the host controller.
info
A pointer to a usbd_hcd_info_t data structure that this function fills in.

Library:

libusbdi

Description:

You can use the usbd_hcd_ext_info() or usbd_hcd_info() function to obtain information from the USB host controller and DDK library.

If your system has more than one USB chip, you can call usbd_hcd_ext_info() to get information about a specific one. The usbd_hcd_info() function gets information about the first USB chip; calling it is the same as calling usbd_hcd_ext_info() with a cindex argument of 0.

The usbd_hcd_info_t structure is defined as follows:

 
typedef struct usbd_hcd_info {
    uint16_t                 vusb;
    uint16_t                 vusbd;
    char                    controller[8];
    uint32_t                 capabilities;
    uint8_t                  ndev;
    uint8_t                  cindex;
    uint16_t                 vhcd;
    uint32_t                 max_td_io;
    uint8_t                  reserved[12];
  } usbd_hcd_info_t;

It contains at least the following:

vusb
The version number of the USB stack.
vusbd
The version number of the USB DDK.
controller
The name of the USB host controller.
capabilities
The capabilities of the USB host controller.
ndev
The number of devices currently connected.
cindex
The index of the host controller.
vhcd
The version number of the USB HCD.
max_td_io
The maximum number of bytes per HC TD.

Returns:

EOK
Success.

Classification:

QNX Neutrino, QNX 4

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

See also:

usbd_args_lookup(), usbd_configuration_descriptor(), usbd_device_lookup(), usbd_device_extra(), usbd_device_descriptor(), usbd_endpoint_descriptor(), usbd_hub_descriptor(), usbd_interface_descriptor(), usbd_languages_descriptor(), usbd_parse_descriptors(), usbd_string(), usbd_urb_status()