Add support for the Arduino Leonardo (m32u4) #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit add support for the Arduino Leonardo and other compatible boards with an ATMega32U4 microcontroller.
Changes: No change to the inline assembler code or timings were made, only a minor tweak of the memory layout was required.
This modification should not have any impact on performance. It's just a bits position modification.
All modified code is wrapped with if defined(AVR_ATmega32U4) to avoid any compilation error on others platforms.
Known limitations: Will not work with the Adafruit RGB Matrix Shield in the default jumpers wiring configuration. Cutting the jumpers and rewiring is required.
Pinout is
CLK can be used with the pin D12, D6, D4, D3, D2 or D0 / D1 (if you don't plan to use Serial1).
A, B, C, D can be on any other pins, but D8, D9, D10 and D11 are recommended for easy wiring.
The new code was tested with a 32x32 matrix, all examples are working.