Fix broken MagStripe demo due to the HID Class driver changes.
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 21 Sep 2009 06:46:39 +0000 (06:46 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 21 Sep 2009 06:46:39 +0000 (06:46 +0000)
Projects/Magstripe/Magstripe.c
Projects/Magstripe/Magstripe.h

index 3ea5052..7b3f0be 100644 (file)
@@ -180,18 +180,18 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
        if ((IsKeyReleaseReport) || (CurrentTrackBuffer == &TrackDataBuffers[TOTAL_TRACKS]))\r
        {\r
                /* No more data to send, or key release report between key presses */\r
        if ((IsKeyReleaseReport) || (CurrentTrackBuffer == &TrackDataBuffers[TOTAL_TRACKS]))\r
        {\r
                /* No more data to send, or key release report between key presses */\r
-               KeyboardReport->KeyCode = KEY_NONE;\r
+               KeyboardReport->KeyCode[0] = KEY_NONE;\r
        }\r
        else if (!(CurrentTrackBuffer->Elements))\r
        {\r
                /* End of current track, send an enter press and change to the next track's buffer */\r
        }\r
        else if (!(CurrentTrackBuffer->Elements))\r
        {\r
                /* End of current track, send an enter press and change to the next track's buffer */\r
-               KeyboardReport->KeyCode = KEY_ENTER;\r
+               KeyboardReport->KeyCode[0] = KEY_ENTER;\r
                CurrentTrackBuffer++;\r
        }\r
        else\r
        {\r
                /* Still data in the current track; convert next bit to a 1 or 0 keypress */\r
                CurrentTrackBuffer++;\r
        }\r
        else\r
        {\r
                /* Still data in the current track; convert next bit to a 1 or 0 keypress */\r
-               KeyboardReport->KeyCode = BitBuffer_GetNextBit(CurrentTrackBuffer) ? KEY_1 : KEY_0;\r
+               KeyboardReport->KeyCode[0] = BitBuffer_GetNextBit(CurrentTrackBuffer) ? KEY_1 : KEY_0;\r
        }\r
        \r
        *ReportSize = sizeof(USB_KeyboardReport_Data_t);\r
        }\r
        \r
        *ReportSize = sizeof(USB_KeyboardReport_Data_t);\r
index aabf6ac..36e4d70 100644 (file)
 \r
                /** HID keyboard keycode to indicate that the enter key is currently pressed. */\r
                #define KEY_ENTER          40\r
 \r
                /** HID keyboard keycode to indicate that the enter key is currently pressed. */\r
                #define KEY_ENTER          40\r
-               \r
-       /* Type Defines: */\r
-               /** Type define for the keyboard report structure. This structure matches the report layout\r
-                *  given to the host in the HID Report descriptor, as well as matches the boot protocol report\r
-                *  structure. This means that this one report structure can be used in both Report and Boot Protocol\r
-                *  modes. */\r
-               typedef struct\r
-               {\r
-                       uint8_t Modifier; /**< Modifier byte, indicating pressed modifier keys such as CTRL or ALT */\r
-                       uint8_t Reserved; /**< Reserved for OEM use, always set to 0 */\r
-                       uint8_t KeyCode; /**< Key code array for pressed keys - up to six can be given simultaneously */\r
-               } USB_KeyboardReport_Data_t;\r
        \r
        /* Function Prototypes: */\r
                void SetupHardware(void);\r
        \r
        /* Function Prototypes: */\r
                void SetupHardware(void);\r