-
Notifications
You must be signed in to change notification settings - Fork 118
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
base: master
Are you sure you want to change the base?
Unify platforms #10
Conversation
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]>
Awesome! The diffs look good. I'm out of town at the moment, but will try it out early next week. |
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. |
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]>
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]>
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.