Skip to content

Fix bug for issue: initial pin value not retained #5487

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

Merged
merged 1 commit into from
Nov 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions targets/TARGET_NORDIC/TARGET_NRF5/gpio_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
typedef struct {
bool used_as_gpio : 1;
PinDirection direction : 1;
bool init_high : 1;
PinMode pull : 2;
bool used_as_irq : 1;
bool irq_fall : 1;
Expand Down Expand Up @@ -156,7 +155,7 @@ static void gpio_apply_config(uint8_t pin)
}
else {
// Configure as output.
nrf_drv_gpiote_out_config_t cfg = GPIOTE_CONFIG_OUT_SIMPLE(m_gpio_cfg[pin].init_high);
nrf_drv_gpiote_out_config_t cfg = GPIOTE_CONFIG_OUT_SIMPLE(nrf_gpio_pin_out_read(pin));
nrf_drv_gpiote_out_init(pin, &cfg);
}
m_gpio_initialized |= ((gpio_mask_t)1UL << pin);
Expand Down