2022-06-30 11:16:29 -07:00
|
|
|
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/usbnova */
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Arduino.h>
|
2023-06-27 07:37:04 -07:00
|
|
|
#include "config.h"
|
2022-06-30 11:16:29 -07:00
|
|
|
|
|
|
|
#ifdef ENABLE_DEBUG
|
|
|
|
|
|
|
|
#define debug_init() DEBUG_PORT.begin(DEBUG_BAUD);
|
|
|
|
|
|
|
|
#define debugF(...) if (DEBUG_PORT) DEBUG_PORT.print(F(__VA_ARGS__))
|
|
|
|
#define debuglnF(...) if (DEBUG_PORT) DEBUG_PORT.println(F(__VA_ARGS__))
|
|
|
|
|
|
|
|
#define debug(...) if (DEBUG_PORT) DEBUG_PORT.print(__VA_ARGS__)
|
|
|
|
#define debugln(...) if (DEBUG_PORT) DEBUG_PORT.println(__VA_ARGS__)
|
|
|
|
|
|
|
|
#else /* ifdef ENABLE_DEBUG */
|
|
|
|
|
2023-06-20 08:02:20 -07:00
|
|
|
#define debug_init() Serial.end();
|
2022-06-30 11:16:29 -07:00
|
|
|
|
|
|
|
#define debugF(...) 0
|
|
|
|
#define debuglnF(...) 0
|
|
|
|
|
|
|
|
#define debug(...) 0
|
|
|
|
#define debugln(...) 0
|
|
|
|
|
|
|
|
#endif /* ifdef ENABLE_DEBUG */
|