-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add LED color remapping definitions to Odin target #4995
Conversation
SW0 = PF_2, // Switch-0 | ||
SW1 = PB_6, // Green / Switch-1 | ||
LED1 = PE_0, // Red / Mode | ||
LED2 = PB_6, // Green / Switch-1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there some weird pin overflow here, since LED2= PB_6 and also SW1 = PB_6. I.e. does it mean SW1 button aka BUTTON2 will not work if the LED works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a bit strange...it seems to match the Ublox documentation though.
This test program also built and ran as expected:
#include "mbed.h"
DigitalOut led2(LED2);
DigitalIn sw1(SW1, PullUp);
int main() {
while (true) {
led2 = !sw1;
printf("%d\r\n", sw1.read());
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I think the LEDs overrun the button.
Always split whitespace changes to a new commit, it produces lot of noise , distraction from the real changes. Can you please? |
LGTM |
@kegilbert Let us know once you rebase, thanks |
51ce522
to
da655f3
Compare
da655f3
to
41000e0
Compare
@0xc0170 Sorry for the wait, rebased it with just the remapping. |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Odin target was missing LED_RED/GREEN/BLUE definitions that other client targets used. Adding these definitions removes the need to #ifdef around Odin targets in client source when referencing LEDs.
Majority of whitespace changes were to line up the assignments. Lines 157-159 are the import changes with the addition of:
CC @mray19027