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

Unify platforms #10

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

tormodvolden
Copy link
Contributor

With this we can maintain Maple and Maple Mini (and others) in the same branch. I have tested it on Maple Mini. Remember to run "make clean" when switching platforms.

Other than shaving of a whopping 4 bytes from the binary, this is just
the most straight-forward way of resetting bits.

Signed-off-by: Tormod Volden <[email protected]>
common.h itself is the only file to include config.h

Signed-off-by: Tormod Volden <[email protected]>
Signed-off-by: Tormod Volden <[email protected]>
@mbolivar
Copy link
Contributor

mbolivar commented May 9, 2014

Awesome! The diffs look good. I'm out of town at the moment, but will try it out early next week.

@tormodvolden
Copy link
Contributor Author

OK. Meanwhile I will split out "Also remove spurious configuration of the whole LED (GPIOA) bank" as a separate commit - this is a real and significant change, while the rest is just refactored code.

@tormodvolden
Copy link
Contributor Author

The above GPIOA bank initialization change is not significant as long as SetupLED() is the first to configure that bank, but I split it out anyway.

This is not much of an issue as long as SetupLED() is the first place
the GPIOA bank is configured and the ports are inputs anyway, but it
would cause trouble if something tried to configure any of the ports
before SetupLED().

Note that ports are by default floating inputs after reset,
but this configuration was setting them to analog inputs instead.

Signed-off-by: Tormod Volden <[email protected]>
Example:
make PLATFORM=MAPLE

Signed-off-by: Tormod Volden <[email protected]>
Example:
make PLATFORM=MAPLE_MINI

Signed-off-by: Tormod Volden <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants