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
+2 -2
View File
@@ -31,7 +31,7 @@ void handleUsbConnection()
if (!usbStarted && usbPlugged()) {
usbStarted = true;
usbInit();
usbStart();
#if defined(USB_MASS_STORAGE)
opentxClose(false);
usbPluggedIn();
@@ -39,7 +39,7 @@ void handleUsbConnection()
}
if (usbStarted && !usbPlugged()) {
usbStarted = false;
usbDeInit();
usbStop();
#if defined(USB_MASS_STORAGE) && !defined(EEPROM)
opentxResume();
#endif