summaryrefslogtreecommitdiff
path: root/hid/pico/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'hid/pico/src/main.c')
-rw-r--r--hid/pico/src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hid/pico/src/main.c b/hid/pico/src/main.c
index 2819bd7a..7d8c6843 100644
--- a/hid/pico/src/main.c
+++ b/hid/pico/src/main.c
@@ -127,7 +127,8 @@ int main(void) {
gpio_init(_COMM_PIN);
gpio_set_dir(_COMM_PIN, GPIO_IN);
gpio_pull_up(_COMM_PIN);
- _comm_use_spi = !gpio_get(_COMM_PIN);
+ sleep_ms(10); // Нужен небольшой слип для активации pull-up
+ _comm_use_spi = gpio_get(_COMM_PIN);
_COMM(init, _data_handler, _timeout_handler);
while (true) {