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

Projects
None yet
6 participants
@kegilbert
Contributor

kegilbert commented Aug 30, 2017

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

@kegilbert kegilbert requested a review from JanneKiiskila Aug 30, 2017

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_UBLOX_EVK_ODIN_W2/PinNames.h Outdated
SW0 = PF_2, // Switch-0
SW1 = PB_6, // Green / Switch-1
LED1 = PE_0, // Red / Mode
LED2 = PB_6, // Green / Switch-1

This comment has been minimized.

@JanneKiiskila

JanneKiiskila Aug 30, 2017

Contributor

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?

This comment has been minimized.

@kegilbert

kegilbert Aug 30, 2017

Contributor

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

This comment has been minimized.

@JanneKiiskila

JanneKiiskila Aug 30, 2017

Contributor

Yep, I think the LEDs overrun the button.

@0xc0170

This comment has been minimized.

Member

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 0xc0170 added the needs: work label Aug 31, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 31, 2017

@andreaslarssonublox

This comment has been minimized.

Contributor

andreaslarssonublox commented Aug 31, 2017

LGTM

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 1, 2017

@kegilbert Let us know once you rebase, thanks

@kegilbert kegilbert force-pushed the kegilbert:odin-led-remap branch 4 times, most recently Sep 1, 2017

@kegilbert kegilbert force-pushed the kegilbert:odin-led-remap branch to 41000e0 Sep 1, 2017

@kegilbert

This comment has been minimized.

Contributor

kegilbert commented Sep 1, 2017

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

@0xc0170 0xc0170 added needs: CI and removed needs: work labels Sep 4, 2017

@0xc0170

0xc0170 approved these changes Sep 4, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 4, 2017

/morph test

@mbed-bot

This comment has been minimized.

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!

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Sep 5, 2017

@theotherjimmy theotherjimmy merged commit 34d41c5 into ARMmbed:master Sep 5, 2017

4 checks passed

Cam-CI uvisor Build & Test Success
Details
ci/morph-test Job has completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@kegilbert kegilbert deleted the kegilbert:odin-led-remap branch Sep 5, 2017

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