Anthony Lieuallen
44fd6822cf
Address "dereferencing type-punned pointer" warnings.
...
With compiler warnings set to "More", and compiling against this library, I see warnings of the form:
hidboot.h:381:21: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
num_of_conf = ((USB_DEVICE_DESCRIPTOR*)buf)->bNumConfigurations;
^
This change addresses those warnings, making issues in my own code easier to notice.
2017-01-28 12:41:10 -05:00
Jose A. Jimenez
a948b7afe5
Some corrections as agreed with @Lauszus. Added flag bRptProtoEnable to HIDBoot() constructor. The flag defaults to false in order to maintain current behavior (Boot Protocol). If flag is the to true, HIDBoot() will enable the Report Protocol. This modification is very useful for communication with HID devices with the full, richer, Report Protocol.
2016-02-16 12:20:39 +01:00
Jose A. Jimenez
e9c28d762d
Added flag bRptProtoEnable to HIDBoot() constructor. The flag defaults to false in order to maintain current behavior (Boot Protocol). If flag is the to true, HIDBoot() will enable the Report Protocol. This modification is very useful for communication with HID devices with the full, richer, Report Protocol.
2016-02-07 22:32:08 +01:00
Pavel Fatin
969eabb8d7
Compatibility with Arduino's core HID / Mouse / Keyboard libraries
...
The following collisions resolved:
hid.h -> usbhid.h
hid.cpp -> usbhid.cpp
HID -> USBHID
HID_BOOT_PROTOCOL -> USB_HID_BOOT_PROTOCOL
HID_PROTOCOL_NONE -> USB_HID_PROTOCOL_NONE
HID_PROTOCOL_KEYBOARD -> USB_HID_PROTOCOL_KEYBOARD
HID_PROTOCOL_MOUSE -> USB_HID_PROTOCOL_MOUSE
As a result, it's possible to use the library together with Arduino's bundled HID / Mouse / Keyboard libraries (Leonardo, Micro, or Due).
https://www.arduino.cc/en/Reference/MouseKeyboard
2016-01-16 20:34:16 +01:00
Kristian Sloth Lauszus
fb723fcbb0
Don't set epAttribs to 0, as this will set bmNakPower to 0 as well. Instead set bmSndToggle and bmRcvToggle explicit to 0.
...
Fixes : #184
2015-11-18 00:11:33 +01:00
Kristian Sloth Lauszus
2f4907ab31
Fix formatting
2015-09-04 00:41:30 +02:00
Allen Johnson-Weltzin
8f86fd4e04
fix for keyboard LED operation
2015-08-31 10:28:26 -05:00
Allen Johnson-Weltzin
12e184349f
Revert "Correction to keyboard LED operation"
...
This reverts commit 26afaf4dea
.
2015-08-31 10:21:26 -05:00
Allen Johnson-Weltzin
26afaf4dea
Correction to keyboard LED operation
2015-08-31 10:16:29 -05:00
Kristian Sloth Lauszus
a2265ea0a9
All these files changes were changed in: bc8000f782
...
I suspect Andrew used force push to overwrite the history
2015-03-19 18:11:22 +01:00
Andrew J. Kroll
d25f28109d
all sources to LF
2015-02-22 13:18:45 -05:00
Andrew J. Kroll
bd8c8e7404
Fix use of "bool" so ARM compiles correctly
2015-02-19 03:14:39 -05:00
Andrew J. Kroll
196a0b69be
Fix all demos, fix all wrong uses of virtual keyword, some spacing cleanup.
2014-11-10 01:35:13 -05:00
Andrew J. Kroll
f2bfe0671e
Check subclasses during enumeration
2014-08-04 08:47:03 -04:00
Andrew J. Kroll
d56ed57495
Fix 1 month rollover bug -- Lei Shi found this one in one place, I found the problem all over the library and patched them all.
2014-05-22 23:36:33 -04:00
Andrew J. Kroll
d29a00d761
fix mid button and struct
2013-12-25 05:24:59 -05:00
Andrew J. Kroll
b8fb19fb90
Optimize mouse code, add notes.
2013-12-25 04:49:01 -05:00
Andrew J. Kroll
d17e1f94cb
HID fixes
...
Fix incorrect GetReportDescr args. We want the interface index.
HID BOOT mouse will now always work
HID BOOT keyboard will now always work
2013-12-25 01:08:02 -05:00
Andrew J. Kroll
c298e349ae
HID_BOOT fixes.
...
Fix Keyboard init issue.
Set boot protocol and idle on all interfaces.
TO-DO:
Investagate mouse init issue.
There are many devices with quirks that can not be worked around easily on
such a small platform. These need to be addressed.
Note! This commit does not fully fix mouse problems on all mouse adaptors,
but more of them should start working.
2013-12-23 14:12:29 -05:00
Andrew J. Kroll
6638f61352
Finalize fix
2013-12-18 22:20:50 -05:00
Andrew J. Kroll
77efe42a71
Fix hidboot not allocating or checking properly on mouse.
...
Removal of duplicate code: Force all drivers to delay after setting address.
2013-12-18 22:02:51 -05:00
Andrew J. Kroll
5785115cdb
Type fixes, new debug macro, debug bug fixes.
2013-12-18 15:18:28 -05:00
Kristian Lauszus
0a7ffe5776
Allow to override default arrays in hidboot, so it can easily be used with other keyboard layouts
2013-12-05 19:57:50 +01:00
Kristian Lauszus
75637bab31
Merge branch 'master' into xxxajk
2013-12-05 07:26:41 +01:00
Andrew J. Kroll
f38a0f6515
Refactor conflicting defines
2013-12-04 21:11:25 -05:00
Andrew J. Kroll
e18eb57752
fix all warnings for ARM, fix a few small bugs
2013-12-04 18:40:23 -05:00
Kristian Lauszus
315af437ed
Now easier to disable and enable printing of incoming data
2013-12-01 17:06:32 +01:00
Andrew J. Kroll
2432379a27
Improved hidboot, now supports composite keyboard mouse devices.
2013-09-29 16:08:20 -04:00
Andrew J. Kroll
af2cf97b5e
Fix headers
2013-09-23 16:08:31 -04:00
Andrew J. Kroll
811baa0c4d
[BUGFIX] HID - Release bAddress on fail.
2013-09-02 23:01:59 -04:00
Oleg Mazurov
261e5f1bd2
commit
2013-06-11 21:11:43 -06:00
Oleg Mazurov
7d981b4361
Merge branch 'xxxajk' into premerge
2013-06-06 17:19:26 -06:00
Andrew J. Kroll
f1e01dbaab
merge with head
2013-05-16 17:03:44 -04:00
Andrew J. Kroll
814c2baf55
debugging macro fixes
2013-05-16 16:43:51 -04:00
Kenneth Newwood
a669933c44
Added KeyboardReportParser::OnControlKeysChanged(before, after) to be able to react on control key presses and enhanced the HID keyboard example.
2013-05-16 20:45:26 +02:00
Oleg Mazurov
9d58b9d09c
added gearfreak's NAK limit fix
2013-05-12 12:42:06 -06:00
Kenneth Newwood
b3bd3ee059
Make KeyboardReportParser::handleLockingKeys() virtual to override keyboard LED handling.
2013-05-02 13:34:29 +02:00
Andrew J. Kroll
5ec8889fa3
Unify a bunch of debug fail messages to a single point. More needed.
2013-03-30 10:29:16 -04:00
Andrew J. Kroll
904f2ff25a
Clean up code formatting to industry standards.
2013-03-28 04:46:43 -04:00
Andrew J. Kroll
629594f957
Merge my debug changes.
...
Merge my format sanity changes.
Track everything.
2013-03-28 03:26:02 -04:00
Oleg Mazurov
2c728cd7dd
Arduino-1.0 compatibility added
2012-01-10 12:49:42 -07:00
Oleg Mazurov
df307305f5
reduced poll interval to 10ms
2011-10-11 13:16:30 -06:00
Oleg Mazurov
d8596b0077
HID support added
2011-10-11 12:37:54 -06:00