MCHPHIDClass::USBHIDReadReport Method

HID Class DLL

HID Class DLL
MCHPHIDClass::USBHIDReadReport Method
C
static bool USBHIDReadReport(
    unsigned char buffer[]
);
Description

Transfers a buffer from the end device. Returns true if successful, false if the transfer fails.

Preconditions

The DLL should be initialized via a call to HIDClassInit or variant.

Parameters
Parameters 
Description 
buffer 
A byte array up to 64 bytes long. 
Returns

true if the transfer is successful, false if not. A transfer failure may mean the device is no longer connected or it could just mean the end device didn't send any data before timeout.

Remarks
Example
if (MCHPHIDCLASS::USBHIDReadReport (ReadBuffer))
{
    // Process buffer if arrived
    switch (ReadBuffer[0])
    {
    }
}
else
{
    // do other stuff if no data
}
Microchip HID Class DLL 1.10 - [15 April 2010]
Copyright © 2009, 2010 Microchip Technology, Inc.  All rights reserved.