always print debug output to both serial and segger debug port
cc @mc-hamster, this makes USE_SEGGER optional on nrf52 targets
This commit is contained in:
1 parent
619a48085a
commit
67e657f10f
7 files changed
+21
-7
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#include "RedirectablePrint.h"
|
||||
#include "configuration.h"
|
||||
#include <assert.h>
|
||||
|
||||
/**
|
||||
@@ -10,4 +11,14 @@ void RedirectablePrint::setDestination(Print *_dest)
|
||||
{
|
||||
assert(_dest);
|
||||
dest = _dest;
|
||||
}
|
||||
|
||||
size_t RedirectablePrint::write(uint8_t c)
|
||||
{
|
||||
#ifdef SEGGER_STDOUT_CH
|
||||
SEGGER_RTT_PutCharSkip(SEGGER_STDOUT_CH, c);
|
||||
#endif
|
||||
|
||||
dest->write(c);
|
||||
return 1; // We always claim one was written, rather than trusting what the serial port said (which could be zero)
|
||||
}
|
||||
Reference in new issue
Block a user