Re #4125: New functions usbStart() and usbStop() to make USB code cleaner

This commit is contained in:
Damjan Adamic
2016-12-11 16:28:23 +01:00
parent aecf53b3e1
commit a4d899844e
7 changed files with 16 additions and 10 deletions
@@ -361,7 +361,6 @@ int main()
// SD card detect pin
sdInit();
usbInit();
usbDeInit();
#endif
for (;;) {
@@ -384,7 +383,7 @@ int main()
unlocked = 1;
unlockFlash();
}
usbInit();
usbStart();
usbPluggedIn();
}
}
@@ -419,7 +418,7 @@ int main()
lcdDrawTextAlignedLeft(4*FH, STR_USB_CONNECTED);
if (usbPlugged() == 0) {
vpos = 0;
usbDeInit();
usbStop();
if (unlocked) {
lockFlash();
unlocked = 0;