AN249 Silicon_Laboratories, AN249 Datasheet - Page 24

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.9. GetReport_Interrupt()
Description:
Prototype:
Parameters:
Return Value:
6.10. SetReport_Control()
Description:
Prototype:
Parameters:
Return Value:
6.11. GetReport_Control()
Description:
Prototype:
Parameters:
Return Value:
6.12. GetInputReportBufferLength()
Description:
Prototype:
Parameters:
Return Value:
24
This function attempts to retrieve an IN report across the interrupt pipe using a call to
ReadFile().
BYTE GetReport_Interrupt(BYTE* buffer, DWORD bufferSize, WORD
numReports, DWORD* bytesReturned)
1. buffer - pointer to the IN report to be transmitted. This buffer must be able to
store at least bufferSize bytes.
2. bufferSize - should be set to the size of the largest feature report listed in the
device's report descriptor. This information can be obtained by calling the member
function GetInputReportBufferLength().
Results = HID_DEVICE_SUCCESS or
HID_DEVICE_TRANSFER_TIMEOUT or
HID_DEVICE_TRANSFER_FAILED or
HID_DEVICE_NOT_OPENED or
HID_DEVICE_INVALID_BUFFER_SIZE
This function sends a report across the control pipe using the HID API function
HidD_SetOutputReport().
BYTE SetReport_Control(BYTE* buffer, DWORD bufferSize)
1. buffer - pointer to the OUT report to be transmitted. This buffer must be able to
store at least bufferSize bytes.
2. bufferSize - size of the OUT report in bytes.
Results = HID_DEVICE_SUCCESS or
HID_DEVICE_TRANSFER_FAILED or
HID_DEVICE_NOT_OPENED or
HID_DEVICE_INVALID_BUFFER_SIZE
This function receives a report across the control pipe using the HID API function
HidD_GetInputReport().
BYTE GetReport_Control(BYTE* buffer, DWORD bufferSize)
1. buffer - pointer to the OUT report to be transmitted. This buffer must be able to
store at least bufferSize bytes.
2. bufferSize - size of the OUT report in bytes.
Results = HID_DEVICE_SUCCESS or
HID_DEVICE_TRANSFER_FAILED or
HID_DEVICE_NOT_OPENED or
HID_DEVICE_INVALID_BUFFER_SIZE
This function returns the size of the largest IN report listed in the Report Descriptor of
the opened HID device.
WORD GetInputReportBufferLength()
None.
The size of the largest IN report.
Rev. 0.2

Related parts for AN249