The local static initialization in USB was causing multiple problems:
-Configurable descriptor values are set only once
-USB descriptor initialization causes a trap in debug builds since
this is acquiring a mutex in an interrupt handler
-Extra ram used since all descriptors are in RAM
This patch fixes these problems by making fixed descriptors
static const so they are stored in flash and never need to be
initialized and by making descriptors that do change a member
of the class so they are always initialized when requested
rather than once though lazy static local initialization.
Minor change - List of key modifiers updated to include the
logo/GUI/windows key. Also added the options to specify the right hand
versions of the keys rather than just the left if for some reason
someone wants to do this.
Changes are limited to the keyboard header file and are backwards
compatible.
The new modifier values are in line with the table given on page 56 of
this document http://www.usb.org/developers/hidpage/HID1_11.pdf