From 1a05311986e654c4601137a8c11583ef96acb10c Mon Sep 17 00:00:00 2001 From: Mirko Pacioni <92960179+mirkopac@users.noreply.github.com> Date: Sat, 23 Sep 2023 22:36:55 +0200 Subject: [PATCH] fix while to recognize the inserted pen drive --- examples/FileWrite/FileWrite.ino | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/FileWrite/FileWrite.ino b/examples/FileWrite/FileWrite.ino index a2bdb54..cfaf66b 100644 --- a/examples/FileWrite/FileWrite.ino +++ b/examples/FileWrite/FileWrite.ino @@ -23,10 +23,8 @@ mbed::DigitalOut otg(PB_8, 1); void setup() { Serial.begin(115200); while (!Serial); - msd.connect(); - - while (!msd.connected()) { - //while (!port.connected()) { + + while (!msd.connect()) { delay(1000); }