Commit 3d1baa6f authored by Dean Camera's avatar Dean Camera
Browse files

Added multiple Report ID support to the HID class driver. Removed OUT endpoint...

Added multiple Report ID support to the HID class driver. Removed OUT endpoint support from HID driver (all OUT reports are now processed through control requests) as a seperate endpoint had issues with determining the exact output report length.
parent 7665bf32
......@@ -76,7 +76,7 @@
/** MIDI command for a note off (deactivation) event */
#define MIDI_COMMAND_NOTE_OFF 0x08
/** Standard key press velocity value used for all note events, as no pressure sensor is mounted */
/** Standard key press velocity value used for all note events */
#define MIDI_STANDARD_VELOCITY 64
/** Convenience macro. MIDI channels are numbered from 1-10 (natural numbers) however the logical channel
......
......@@ -157,7 +157,7 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK)
*
* \return Number of bytes in the created report
*/
uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, void* ReportData)
uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, uint8_t* ReportID, void* ReportData)
{
static bool IsKeyReleaseReport;
static bool IsNewlineReport;
......@@ -204,7 +204,8 @@ uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_t* HIDInterfaceI
* \param ReportData Pointer to the report buffer where the received report is stored
* \param ReportSize Size in bytes of the report received from the host
*/
void CALLBACK_USB_HID_ProcessReceivedHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, void* ReportData, uint16_t ReportSize)
void CALLBACK_USB_HID_ProcessReceivedHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, uint8_t ReportID,
void* ReportData, uint16_t ReportSize)
{
// Unused (but mandatory for the HID class driver) in this demo, since there are no Host->Device reports
}
......@@ -79,8 +79,8 @@
void EVENT_USB_ConfigurationChanged(void);
void EVENT_USB_UnhandledControlPacket(void);
uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, void* ReportData);
void CALLBACK_USB_HID_ProcessReceivedHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo,
void* ReportData, uint16_t ReportSize);
uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, uint8_t* ReportID, void* ReportData);
void CALLBACK_USB_HID_ProcessReceivedHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, uint8_t ReportID,
void* ReportData, uint16_t ReportSize);
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment