Skip to content

SAM 54 Xplained Pro: fix inverted logic for board led#687

Merged
hathach merged 2 commits into
hathach:masterfrom
jgressmann:bugfix/same54xplainedpro-led-inverted
Feb 28, 2021
Merged

SAM 54 Xplained Pro: fix inverted logic for board led#687
hathach merged 2 commits into
hathach:masterfrom
jgressmann:bugfix/same54xplainedpro-led-inverted

Conversation

@jgressmann
Copy link
Copy Markdown
Contributor

This PR fixes the inverted board led logic. the LED was on by default, board_led_write(1) would turn it off.

Copy link
Copy Markdown
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is led pin typo in function off

Comment thread hw/bsp/same54xplainedpro/same54xplainedpro.c
gpio_set_pin_function(BUTTON_PIN, GPIO_PIN_FUNCTION_OFF);
gpio_set_pin_direction(LED_PIN, GPIO_DIRECTION_OUT);
gpio_set_pin_level(LED_PIN, 0);
gpio_set_pin_level(LED_PIN, 1);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about board_led_write(0) to set led to off

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Copy Markdown
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look great, thank you for the pr

@hathach hathach merged commit c61464e into hathach:master Feb 28, 2021
@jgressmann jgressmann deleted the bugfix/same54xplainedpro-led-inverted branch March 2, 2021 17:46
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