Arduino Libraries/USBHost/src/hid2.cpp
/**
 * \brief Get HID report descriptor and parse it.
 *
 * \param ep USB device endpoint.
 * \param parser Parser used to decode report.
 *
 * \return 0 on success, error code otherwise.
 */
\brief Get HID report descriptor and parse it.
\param ep USB device endpoint.
\param parser Parser used to decode report.

\return 0 on success, error code otherwise.
\ brief Get HID report descriptor and parse it . \ param ep USB device endpoint . \ param parser Parser used to decode report . \ return 0 on success error code otherwise .
uint32_t HID::GetReportDescr(uint32_t ep, USBReadParser *parser)
{
	const uint32_t	constBufLen = 64;
	uint8_t			buf[constBufLen];
	return (pUsb->ctrlReq(bAddress, ep, bmREQ_HIDREPORT, USB_REQUEST_GET_DESCRIPTOR, 0x00,
			HID_DESCRIPTOR_REPORT, 0x0000, 128, constBufLen, buf, (USBReadParser*)parser));
}
uint32_t HID :: GetReportDescr ( uint32_t ep , USBReadParser * parser ) { const uint32_t constBufLen = 64 ; uint8_t buf [ constBufLen ] ; return ( pUsb -> ctrlReq ( bAddress , ep , bmREQ_HIDREPORT , USB_REQUEST_GET_DESCRIPTOR , 0x00 , HID_DESCRIPTOR_REPORT , 0x0000 , 128 , constBufLen , buf , ( USBReadParser * ) parser ) ) ; }
\brief Get HID report descriptor and parse it.
\ brief Get HID report descriptor and parse it .