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

Add LED color remapping definitions to Odin target #4995

Merged
merged 1 commit into from
Sep 5, 2017

Conversation

kegilbert
Copy link
Contributor

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:

LED_RED     = LED1,
LED_GREEN   = LED2,
LED_BLUE    = LED3,

CC @mray19027

SW0 = PF_2, // Switch-0
SW1 = PB_6, // Green / Switch-1
LED1 = PE_0, // Red / Mode
LED2 = PB_6, // Green / Switch-1
Copy link
Contributor

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?

Copy link
Contributor Author

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());
    }
}

Copy link
Contributor

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.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 31, 2017

Majority of whitespace changes were to line up the assignments. Lines 157-159 are the import changes with the addition of:

Always split whitespace changes to a new commit, it produces lot of noise , distraction from the real changes. Can you please?

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 31, 2017

@andreaslarssonublox
Copy link

LGTM

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 1, 2017

@kegilbert Let us know once you rebase, thanks

@kegilbert kegilbert force-pushed the odin-led-remap branch 4 times, most recently from 51ce522 to da655f3 Compare September 1, 2017 21:58
@kegilbert
Copy link
Contributor Author

@0xc0170 Sorry for the wait, rebased it with just the remapping.

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 4, 2017

/morph test

@mbed-bot
Copy link

mbed-bot commented Sep 5, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1205

All builds and test passed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants