mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-01 18:27:53 +00:00
Using Serial for debug
This commit is contained in:
parent
84d7986353
commit
5cb2326ea7
@ -333,7 +333,7 @@ enum FailSafeMode {
|
|||||||
|
|
||||||
//Status messages
|
//Status messages
|
||||||
#if defined(STM32_BOARD) && defined (SERIAL_DEBUG)
|
#if defined(STM32_BOARD) && defined (SERIAL_DEBUG)
|
||||||
#define debug(msg, ...) {char buf[64]; sprintf(buf, msg "\r\n", ##__VA_ARGS__); Serial1.write(buf);}
|
#define debug(msg, ...) {char buf[64]; sprintf(buf, msg "\r\n", ##__VA_ARGS__); Serial.write(buf);}
|
||||||
#else
|
#else
|
||||||
#define debug(...)
|
#define debug(...)
|
||||||
#undef SERIAL_DEBUG
|
#undef SERIAL_DEBUG
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
|
|
||||||
//#define DEBUG_TX
|
//#define DEBUG_TX
|
||||||
//#define SERIAL_DEBUG // Only for STM32_BOARD on usart1
|
//#define SERIAL_DEBUG // Only for STM32_BOARD compiled with Serial mode usart1, compiled with STM32 bootloader USB serial
|
||||||
|
|
||||||
#define USE_MY_CONFIG
|
#define USE_MY_CONFIG
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ void setup()
|
|||||||
{
|
{
|
||||||
// Setup diagnostic uart before anything else
|
// Setup diagnostic uart before anything else
|
||||||
#ifdef SERIAL_DEBUG
|
#ifdef SERIAL_DEBUG
|
||||||
Serial1.begin(115200,SERIAL_8N1);
|
Serial.begin(115200,SERIAL_8N1);
|
||||||
debug("Multiprotocol version: %d.%d.%d.%d", VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_PATCH_LEVEL);
|
debug("Multiprotocol version: %d.%d.%d.%d", VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_PATCH_LEVEL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user