on NRF52 use the Segger debug console for debug logging

This commit is contained in:
geeksville
2020-04-23 13:27:16 -07:00
parent 16998ebd8d
commit f0f6c4950b
9 changed files with 3710 additions and 0 deletions

View File

@@ -58,11 +58,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// DEBUG
// -----------------------------------------------------------------------------
#ifndef NO_ESP32
#define USE_SEGGER
#endif
#ifdef USE_SEGGER
#include "SEGGER_RTT.h"
#define DEBUG_MSG(...) SEGGER_RTT_printf(0, __VA_ARGS__)
#else
#ifdef DEBUG_PORT
#define DEBUG_MSG(...) DEBUG_PORT.printf(__VA_ARGS__)
#else
#define DEBUG_MSG(...)
#endif
#endif
// -----------------------------------------------------------------------------
// OLED