diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2009-06-05 02:23:31 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2009-06-05 02:23:31 +0000 |
| commit | 1b00d714feea371eb0367334f4fb20bd004025ef (patch) | |
| tree | 1c2d538c56bb15f2a903a4a1f9e49cd41c3fe38d /Projects | |
| parent | 9ff875e87b6397c5c7a6a6329a82b24db37e6652 (diff) | |
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.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@570 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Projects')
| -rw-r--r-- | Projects/Magstripe/Magstripe.c | 5 | ||||
| -rw-r--r-- | Projects/Magstripe/Magstripe.h | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/Projects/Magstripe/Magstripe.c b/Projects/Magstripe/Magstripe.c index e32397c8..6e5e00b9 100644 --- a/Projects/Magstripe/Magstripe.c +++ b/Projects/Magstripe/Magstripe.c @@ -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
}
diff --git a/Projects/Magstripe/Magstripe.h b/Projects/Magstripe/Magstripe.h index 2b8aa377..6a13af4e 100644 --- a/Projects/Magstripe/Magstripe.h +++ b/Projects/Magstripe/Magstripe.h @@ -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
|
