X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/7c5444b89a49df7cb671b0b041567990d2a3012e..5acf23b25465b82e5516510ee45aa9ed15178ad5:/Projects/Magstripe/Magstripe.h diff --git a/Projects/Magstripe/Magstripe.h b/Projects/Magstripe/Magstripe.h index 2b8aa3770..aabf6ac91 100644 --- a/Projects/Magstripe/Magstripe.h +++ b/Projects/Magstripe/Magstripe.h @@ -48,9 +48,15 @@ #include #include - #include + #include /* Macros: */ + /** Total number of tracks which can be read from the card, between 1 and 3. */ + #define TOTAL_TRACKS 3 + + /** HID keyboard keycode to indicate that no is currently pressed. */ + #define KEY_NONE 0 + /** HID keyboard keycode to indicate that the "1" key is currently pressed. */ #define KEY_1 30 @@ -76,11 +82,13 @@ void SetupHardware(void); void ReadMagstripeData(void); - void EVENT_USB_ConfigurationChanged(void); - void EVENT_USB_UnhandledControlPacket(void); + void EVENT_USB_Device_ConfigurationChanged(void); + void EVENT_USB_Device_UnhandledControlRequest(void); + void EVENT_USB_Device_StartOfFrame(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); - + bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID, + void* ReportData, uint16_t* ReportSize); + void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, + const void* ReportData, const uint16_t ReportSize); + #endif