Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dedupe extrakey report struct and send functions in V-USB & LUFA (#7993) #278

Merged
merged 3 commits into from
Feb 14, 2020

Conversation

drashna
Copy link
Collaborator

@drashna drashna commented Feb 12, 2020

Unifies the EXTRAKEYS report structure.
Merged upstream on Feb 2

Use function for KEYCODE2xxx routines instead of macro. (qmk#8101)
Merged upstream on Feb 3

…k#7993)

* Dedupe extrakey report struct, and send functions in V-USB & LUFA

* Doc comment for consistency

* Wrap it in ifdef to prevent unused function error

* Do the same for ATSAM
@drashna drashna added the enhancement New feature or request label Feb 12, 2020
@drashna drashna requested a review from fdidron February 12, 2020 08:14
qmk-bot and others added 2 commits February 12, 2020 00:15
* Option to use function for KEYCODE2 routines.

Convert the KEYCODE2SYSTEM and KEYCODE2CONSUMER macros to functions,
defaulting to using the macros.  The function form allows the compiler
to optimize the switch statement itself, over the macro nested
ternaries.

To enable this feature, #define USE_KEYCODE2_FUNCTION.

Testing against a random selection of avr-based keyboards, this
increased available flash by ~500 bytes. For arm-based keyboards,
the available flash increased by ~400 bytes.

* Replace macro with function entirely.

As zvecr states, go bold and just commit to using the function instead
of the macro.

* Reformat whitespace now that functional review is done

Verified against clang-format output.
@fdidron fdidron merged commit d3d4fec into staging Feb 14, 2020
@fdidron fdidron deleted the fix/extra_key_reports branch February 14, 2020 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants