Skip to content

Commit 694f274

Browse files
Put the PPS/ENABLE/BACKUP pins into their default state at ::end()
1 parent 4f239cc commit 694f274

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

libraries/GNSS/src/GNSS.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,17 @@ void GNSSClass::uartEnd()
634634

635635
_enabled = false;
636636
}
637+
638+
if (_pins.pps != STM32L0_GPIO_PIN_NONE)
639+
{
640+
stm32l0_exti_detach(_pins.pps);
641+
stm32l0_gpio_pin_configure(_pins.pps, (STM32L0_GPIO_PARK_NONE | STM32L0_GPIO_MODE_ANALOG));
642+
}
643+
644+
if (_pins.enable != STM32L0_GPIO_PIN_NONE)
645+
{
646+
stm32l0_gpio_pin_configure(_pins.enable, (STM32L0_GPIO_PARK_NONE | STM32L0_GPIO_MODE_ANALOG));
647+
}
637648

638649
if (_pins.backup != STM32L0_GPIO_PIN_NONE)
639650
{

0 commit comments

Comments
 (0)