Merge "[ion/device] Delay Console::peerConnected by 1ms"

This commit is contained in:
Émilie Feral
2017-04-10 10:19:28 +02:00
committed by Gerrit

View File

@@ -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);