Add pullup config to endstops to account for NC configs

This commit is contained in:
Unknown
2019-12-22 18:49:53 -05:00
parent 75eff7b333
commit 96e01cc4c2
2 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ void Endstop::set_enabled(bool enable) {
GPIO_InitTypeDef GPIO_InitStruct;
GPIO_InitStruct.Pin = gpio_pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = config_.is_active_high ? GPIO_PULLDOWN : GPIO_PULLUP;
GPIO_InitStruct.Pull = config_.pullup ? GPIO_PULLUP : GPIO_PULLDOWN;
HAL_GPIO_Init(gpio_port, &GPIO_InitStruct);
}
}