Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lufa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Strand
lufa
Commits
4530a546
Commit
4530a546
authored
15 years ago
by
Dean Camera
Browse files
Options
Downloads
Patches
Plain Diff
Fix broken MagStripe demo due to the HID Class driver changes.
parent
6bbd2a99
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Projects/Magstripe/Magstripe.c
+3
-3
3 additions, 3 deletions
Projects/Magstripe/Magstripe.c
Projects/Magstripe/Magstripe.h
+0
-12
0 additions, 12 deletions
Projects/Magstripe/Magstripe.h
with
3 additions
and
15 deletions
Projects/Magstripe/Magstripe.c
+
3
−
3
View file @
4530a546
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Projects/Magstripe/Magstripe.h
+
0
−
12
View file @
4530a546
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment