Skip to content

Commit 603e63d

Browse files
author
rechrtb
committed
Fix issue with checking if already in host mode
1 parent c19ed1a commit 603e63d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TinyUsbInterface.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ bool CoreUsbSetHostMode(bool hostMode, const StringRef& reply)
338338
return false;
339339
}
340340

341-
if (hostMode && digitalRead(UsbVbusDetect))
341+
if (!CoreUsbIsHostMode() && digitalRead(UsbVbusDetect))
342342
{
343343
reply.printf("Unable to change to host mode, board plugged in to computer\n");
344344
return false;

0 commit comments

Comments
 (0)