X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/b462f2d457ec2f0cfa22a1c3db198cb22f6809a1..5acf23b25465b82e5516510ee45aa9ed15178ad5:/Projects/Magstripe/Magstripe.h diff --git a/Projects/Magstripe/Magstripe.h b/Projects/Magstripe/Magstripe.h index 1009e32e8..aabf6ac91 100644 --- a/Projects/Magstripe/Magstripe.h +++ b/Projects/Magstripe/Magstripe.h @@ -51,6 +51,12 @@ #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,12 +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_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID, - void* ReportData); - void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, - const void* ReportData, const 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