1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 00:35:18 +03:00

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

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