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:
committed by
Bertrand Songis
parent
2910488a30
commit
b7acee5723
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user