Allow USB mode selection on USB connect (#5193)

Allow all USB modes to be compiled in at the same time
This commit is contained in:
Arne Schwabe
2017-09-10 17:28:08 +02:00
committed by Bertrand Songis
parent 2910488a30
commit b7acee5723
45 changed files with 1515 additions and 1239 deletions
+7 -7
View File
@@ -2,7 +2,7 @@
* Copyright (C) OpenTX
*
* Based on code named
* th9x - http://code.google.com/p/th9x
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
@@ -25,12 +25,12 @@
#define PRINTF_BUFFER_SIZE 128
void serialPutc(char c)
{
#if defined(USB_SERIAL)
usbSerialPutc(c);
#elif defined(SERIAL2)
serial2Putc(c);
void serialPutc(char c) {
if (getSelectedUsbMode() == USB_SERIAL_MODE)
usbSerialPutc(c);
#if defined(SERIAL2)
if (serial2TracesEnabled())
serial2Putc(c);
#endif
}