C
static bool USBHIDWriteReport( unsigned char buffer[], unsigned int nBytes );
Description
Transfers the buffer to 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 |
up to 64 byte array |
nBytes |
unsigned int. Number of valid bytes in the buffer. |
Returns
true if the transfer is successful, false if not. A failure to transfer usually means the device has been disconnected.
Remarks
The full buffer size is always transfered, regardless of how many are valid
Example
ToSendBuffer [0] = 'H'; ToSendBuffer [1] = 'i'; ToSendBuffer [2] = ' '; ToSendBuffer [3] = 'M'; ToSendBuffer [4] = 'o'; ToSendBuffer [5] = 'm'; ToSendBuffer [6] = '!'; MCHPHIDCLASS::USBHIDWriteReport (ToSendBuffer, 7);