HIDDevice

Syntax

#include <cafe/hid.h>
    
typedef struct
{

    u32 handle;
    u32 physical_device_inst;
    u16 vid;
    u16 pid;
    u8  interface_index;
    u8  sub_class;
    u8  protocol;

    u16 max_packet_size_rx;
    u16 max_packet_size_tx;

} HIDDevice;

Elements

handle Handle associated with the HID interface.
physical_device_inst Instance of the physical device. This is useful if the user has to tie together HID interfaces belonging to the same physical device.
vid Vendor ID of the physical device.
pid Product ID of the physical device.
interface_index Interface index for this interface.
sub_class Interface subclass.
protocol Interface protocol.
max_packet_size_rx The maximum packet size of the RX endpoint is 0 if the endpoint does not exist.
max_packet_size_tx The maximum packet size of the TX endpoint is 0 if the endpoint does not exist.

Description

HIDDevice is a data structure representing an HID interface on attach or detach events. An HID client may examine the data listed in the table above when choosing to adopt a suitable device. An HID client may also perform additional get descriptor transactions to query the interface further for any reason. HID clients should store any data to reference locally at runtime, such as handle and interface indexes and whatever else it deems necessary.

See Also

HIDAttachCallback
HIDAddClient
HIDDelClient

Revision History

2013-05-08 Automated cleanup pass.
2011-09-29 Initial version.


CONFIDENTIAL