mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Cli fixes
This commit is contained in:
parent
6356fbb2f4
commit
17cb8f9459
6 changed files with 17 additions and 27 deletions
|
@ -42,6 +42,14 @@
|
|||
#include "dump.h"
|
||||
#include "cli.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
uint8_t serial2TracesEnabled();
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(SIMU)
|
||||
typedef void (*traceCallbackFunc)(const char * text);
|
||||
extern traceCallbackFunc traceCallback;
|
||||
|
@ -49,9 +57,9 @@ void debugPrintf(const char * format, ...);
|
|||
#elif defined(DEBUG) && defined(CLI) && defined(USB_SERIAL)
|
||||
#define debugPrintf(...) do { if (cliTracesEnabled) serialPrintf(__VA_ARGS__); } while(0)
|
||||
#elif defined(DEBUG) && defined(CLI)
|
||||
#define debugPrintf(...) do { if (serialTracesEnabled() && cliTracesEnabled) serialPrintf(__VA_ARGS__); } while(0)
|
||||
#define debugPrintf(...) do { if (serial2TracesEnabled() && cliTracesEnabled) serialPrintf(__VA_ARGS__); } while(0)
|
||||
#elif defined(DEBUG) && defined(CPUARM)
|
||||
#define debugPrintf(...) do { if (serialTracesEnabled()) serialPrintf(__VA_ARGS__); } while(0)
|
||||
#define debugPrintf(...) do { if (serial2TracesEnabled()) serialPrintf(__VA_ARGS__); } while(0)
|
||||
#else
|
||||
#define debugPrintf(...)
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue