AN249 Silicon_Laboratories, AN249 Datasheet - Page 22

no-image

AN249

Manufacturer Part Number
AN249
Description
Human Interface Device Tutorial
Manufacturer
Silicon_Laboratories
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AN2490NFHP
Manufacturer:
PANASONIC/松下
Quantity:
20 000
Part Number:
AN2491NFHP
Manufacturer:
PANASON
Quantity:
5 510
Part Number:
AN2491NFHP
Manufacturer:
MAXIM
Quantity:
5 510
AN249
6.3. GetSerialString()
Description:
Prototype:
Parameters:
Return Value:
6.4. Open()
Description:
Prototype:
Parameters:
Return Value:
6.5. IsOpened()
Description:
Prototype:
Parameters:
Return Value:
22
This routine obtains the serial string of a device by its index within its VID and PID. If
only one device is connected with VID 0x10C4, 0x9999, its index is 0. If three devices
are connected with VID 0x10C4, 0x9999, they would be referenced as devices 0, 1,
and 2.
BYTE GetSerialString(DWORD deviceIndex, WORD vid, WORD pid,
LPSTR serialString, DWORD serialStringLength)
1. deviceIndex - identifier for device, 0 unless multiple devices with matching pid
and vid are attached to the USB.
2. vid - device VID used in search.
3. pid - device PID used in search.
4.serialString - pointer where retrieved string will be stored.
5.serialStringLength - length of string to be retrieved.
Results = HID_DEVICE_NOT_FOUND or
This routine opens a communication link to an attached HID device identified by index,
VID, and PID. This routine also adjusts the number of input reports that can be
received by the system's HID class driver buffer.
BYTE
numInputBuffers)
1. deviceIndex - identifier for device, 0 unless multiple devices with matching pid
and vid are attached to the USB.
2. vid - device VID used in search.
3. pid - device PID used in search.
4.numInputBuffers - changes the size of the input report buffer. In most systems,
it is not necessary to use this parameter.
Results = HID_DEVICE_SUCCESS or
This routine is used to determine when a call to Open() has successfully opened a
communication link with an attached HID device.
BOOL IsOpened()
None.
TRUE if communication link is open, or
FALSE if no link has been opened.
Open(DWORD
HID_DEVICE_SUCCESS
HID_DEVICE_ALREADY_OPENED or
HID_DEVICE_NOT_FOUND
Rev. 0.2
deviceIndex,
WORD
vid,
WORD
pid,
WORD

Related parts for AN249