Commit Graph

7 Commits

Author SHA1 Message Date
fauxpark 4335b97a07 Reorder Raw HID interface to match what the USB spec expects (#6801) 2019-10-08 11:47:37 -07:00
skullY b624f32f94 clang-format changes 2019-08-30 15:01:52 -07:00
fauxpark ac16726895 LUFA USB descriptor cleanup (#4871)
* Fix indentation

* Fix braces

* Expand descriptor headers

* Align descriptor elements

* Nicer formatting

* Tidy up preprocessor statements

* Remove VERSION_BCD redefine - LUFA_VERSION_INTEGER is currently 0x170418

* Tidy up comments

* Tweak ordering of  HID report elements (no functional changes)

* We don't need all of these newlines

* Move default USB_MAX_POWER_CONSUMPTION closer to where it makes sense

* Ask nicely

* Add some more comments

* Change indentation back to 4 spaces

* Add changelog entry
2019-08-30 15:01:52 -07:00
James Laird-Wah 39bd760faf Use a single endpoint for HID reports (#3951)
* Unify multiple HID interfaces into one

This reduces the number of USB endpoints required, which frees them up
for other things.

NKRO and EXTRAKEY always use the shared endpoint.

By default, MOUSEKEY also uses it. This means it won't work as a Boot
Procotol mouse in some BIOSes, etc. If you really think your
keyboard needs to work as a mouse in your BIOS, set
MOUSE_SHARED_EP = no in your rules.mk.

By default, the core keyboard does not use the shared endpoint, as not
all BIOSes are standards compliant and that's one place you don't want
to find out your keyboard doesn't work.. If you are really confident,
you can set KEYBOARD_SHARED_EP = yes to use the shared endpoint here
too.

* unify endpoints: ChibiOS protocol implementation

* fixup: missing #ifdef EXTRAKEY_ENABLEs

broke build on AVR with EXTRAKEY disabled

* endpoints: restore error when too many endpoints required

* lufa: wait up to 10ms to send keyboard input

This avoids packets being dropped when two reports are sent in quick
succession (eg. releasing a dual role key).

* endpoints: fix compile on ARM_ATSAM

* endpoint: ARM_ATSAM fixes

No longer use wrong or unexpected endpoint IDs

* endpoints: accommodate VUSB protocol

V-USB has its own, understandably simple ideas about the report formats.
It already blasts the mouse and extrakeys through one endpoint with
report IDs. We just stay out of its way.

* endpoints: document new endpoint configuration options

* endpoints: respect keyboard_report->mods in NKRO

The caller(s) of host_keyboard_send expect to be able to just drop
modifiers in the mods field and not worry about whether NKRO is in use.
This is a good thing. So we just shift it over if needs be.

* endpoints: report.c: update for new keyboard_report format
2018-11-15 22:22:05 -08:00
fauxpark 6982e63a4a Tabs to spaces in usb_descriptor.h 2018-04-11 18:13:32 -04:00
Fred Sundvik 25c7533092 Change the CDC_NOTIFICATION_EPSIZE back to 8 from 32 2018-02-12 15:48:44 -05:00
fredizzimo 53ff8a31b6 Merge ChibiOS and LUFA descriptor support (#2362)
* Move lufa descriptor to protocol/usb_descriptor

* Try to compile usb_descriptor on ChibiOS

* Add lufa_utils for ChibiOS

Lufa USB descriptors for ChibiOS

* More lufa_util compatibility fixes

* First compiling version of shared USB descriptor

* Send the usb descriptors

* Fix the CONSOLE output on ChibiOS

* Add errors for unsupported interfaces

* Enable support for vitual serial port USB descriptors

* Implement virtual serial port for ChibiOS

* Cleanup the lufa_utils

Use the default lufa header files

* Add raw hid support for ChibiOS

This is completely untested

* Enable midi compilation on ChibiOS

* Move midi functionality out of lufa.c

* Don't register sysex callback when not needed

* ChibiOS compilation fixes

* Update ChibiOS submodule

* Fix the Midi USB descriptor

It didn't work properly when both Midi and Virtual serial port was enabled.

* Add MIDI support for ChibiOS

* Fix USB descriptor strings on ChibiOS

* Use serial usb driver for raw hid

* Generalize the ChibiOS stream like drivers

This makes the initialization much more simple and eliminates a lot of
the code duplication.

* Convert console output to chibios stream driver

* Fixes for ChibiOS update

* Update the ChibiOS contrib submodule

To include the usb data toggle synchronization fixes

* Fix duplicate reset enumeration on ChibiOS

* Add missing include

* Add number of endpoints check for ChibiOS

* Enable serial USB driver on all keyboards

* Add missing includes when API is enabled withot midi

* Add another missing inlcude
2018-02-08 15:07:46 -05:00