Increased pullup delay significantly to maybe improve board detection stability. 10 loops was only tens of ns. (#567)

master
robbederks 2020-07-02 23:07:27 +02:00 committed by GitHub
parent 387fd681dd
commit 2fab502cad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ void peripherals_init(void){
}
// Detection with internal pullup
#define PULL_EFFECTIVE_DELAY 10
#define PULL_EFFECTIVE_DELAY 4096
bool detect_with_pull(GPIO_TypeDef *GPIO, int pin, int mode) {
set_gpio_mode(GPIO, pin, MODE_INPUT);
set_gpio_pullup(GPIO, pin, mode);