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:
parent
aecf53b3e1
commit
a4d899844e
7 changed files with 16 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue