X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/3d1baa6f953c3c78c78c31466c4f551123e84415..f896c00c48f04fb9273555ab8d9b1af99f865d25:/Projects/Magstripe/Magstripe.c?ds=inline diff --git a/Projects/Magstripe/Magstripe.c b/Projects/Magstripe/Magstripe.c index 6e5e00b91..4e26d9b22 100644 --- a/Projects/Magstripe/Magstripe.c +++ b/Projects/Magstripe/Magstripe.c @@ -46,7 +46,7 @@ BitBuffer_t TrackDataBuffers[3]; * passed to all HID Class driver functions, so that multiple instances of the same class * within a device can be differentiated from one another. */ -USB_ClassInfo_HID_t Keyboard_HID_Interface = +USB_ClassInfo_HID_Device_t Keyboard_HID_Interface = { .InterfaceNumber = 0, @@ -153,11 +153,12 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK) /** HID Class driver callback function for the creation of a HID report for the host. * * \param HIDInterfaceInfo Pointer to the HID interface structure for the HID interface being referenced + * \param ReportID Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID * \param ReportData Pointer to the preallocated report buffer where the created report should be stored * * \return Number of bytes in the created report */ -uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, uint8_t* ReportID, void* ReportData) +uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo, uint8_t* ReportID, void* ReportData) { static bool IsKeyReleaseReport; static bool IsNewlineReport; @@ -201,10 +202,11 @@ uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_t* HIDInterfaceI /** HID Class driver callback function for the processing of a received HID report from the host. * * \param HIDInterfaceInfo Pointer to the HID interface structure for the HID interface being referenced + * \param ReportID Report ID of the received report from the host * \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, uint8_t ReportID, +void CALLBACK_USB_HID_ProcessReceivedHIDReport(USB_ClassInfo_HID_Device_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