From d940a9de11d6c2c5cbc8ddedc4f605b036fee2f8 Mon Sep 17 00:00:00 2001 From: Romain Goyet Date: Wed, 5 Apr 2017 17:18:30 +0200 Subject: [PATCH] [ion/device] Delay Console::peerConnected by 1ms Change-Id: I1a759760347c3ff29fc59eb158e59d854b2b5cf6 --- ion/src/device/console.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ion/src/device/console.cpp b/ion/src/device/console.cpp index 3ce52a4ba..04d824589 100644 --- a/ion/src/device/console.cpp +++ b/ion/src/device/console.cpp @@ -63,6 +63,7 @@ void shutdown() { bool peerConnected() { RxPin.group().PUPDR()->setPull(RxPin.pin(), GPIO::PUPDR::Pull::Down); RxPin.group().MODER()->setMode(RxPin.pin(), GPIO::MODER::Mode::Input); + msleep(1); bool result = RxPin.group().IDR()->get(RxPin.pin()); RxPin.group().PUPDR()->setPull(RxPin.pin(), GPIO::PUPDR::Pull::None); RxPin.group().MODER()->setMode(RxPin.pin(), GPIO::MODER::Mode::AlternateFunction);