aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-09-21 06:46:39 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-09-21 06:46:39 +0000
commit4530a546a16b48fdc34c20102bb72c3968487f4e (patch)
tree0734eceabe81997b51f661f5a2ac589a2a5ec748
parent6bbd2a99c216bd47aeeaa53ab3687cb045a37e5a (diff)
downloadlufa-4530a546a16b48fdc34c20102bb72c3968487f4e.tar.gz
lufa-4530a546a16b48fdc34c20102bb72c3968487f4e.tar.bz2
lufa-4530a546a16b48fdc34c20102bb72c3968487f4e.zip
Fix broken MagStripe demo due to the HID Class driver changes.
-rw-r--r--Projects/Magstripe/Magstripe.c6
-rw-r--r--Projects/Magstripe/Magstripe.h12
2 files changed, 3 insertions, 15 deletions
diff --git a/Projects/Magstripe/Magstripe.c b/Projects/Magstripe/Magstripe.c
index 3ea505296..7b3f0be39 100644
--- a/Projects/Magstripe/Magstripe.c
+++ b/Projects/Magstripe/Magstripe.c
@@ -180,18 +180,18 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
if ((IsKeyReleaseReport) || (CurrentTrackBuffer == &TrackDataBuffers[TOTAL_TRACKS]))
{
/* No more data to send, or key release report between key presses */
- KeyboardReport->KeyCode = KEY_NONE;
+ KeyboardReport->KeyCode[0] = KEY_NONE;
}
else if (!(CurrentTrackBuffer->Elements))
{
/* End of current track, send an enter press and change to the next track's buffer */
- KeyboardReport->KeyCode = KEY_ENTER;
+ KeyboardReport->KeyCode[0] = KEY_ENTER;
CurrentTrackBuffer++;
}
else
{
/* Still data in the current track; convert next bit to a 1 or 0 keypress */
- KeyboardReport->KeyCode = BitBuffer_GetNextBit(CurrentTrackBuffer) ? KEY_1 : KEY_0;
+ KeyboardReport->KeyCode[0] = BitBuffer_GetNextBit(CurrentTrackBuffer) ? KEY_1 : KEY_0;
}
*ReportSize = sizeof(USB_KeyboardReport_Data_t);
diff --git a/Projects/Magstripe/Magstripe.h b/Projects/Magstripe/Magstripe.h
index aabf6ac91..36e4d7091 100644
--- a/Projects/Magstripe/Magstripe.h
+++ b/Projects/Magstripe/Magstripe.h
@@ -65,18 +65,6 @@
/** HID keyboard keycode to indicate that the enter key is currently pressed. */
#define KEY_ENTER 40
-
- /* Type Defines: */
- /** Type define for the keyboard report structure. This structure matches the report layout
- * given to the host in the HID Report descriptor, as well as matches the boot protocol report
- * structure. This means that this one report structure can be used in both Report and Boot Protocol
- * modes. */
- typedef struct
- {
- uint8_t Modifier; /**< Modifier byte, indicating pressed modifier keys such as CTRL or ALT */
- uint8_t Reserved; /**< Reserved for OEM use, always set to 0 */
- uint8_t KeyCode; /**< Key code array for pressed keys - up to six can be given simultaneously */
- } USB_KeyboardReport_Data_t;
/* Function Prototypes: */
void SetupHardware(void);