]> rtime.felk.cvut.cz Git - arc.git/blobdiff - include/debug.h
Merge branch 'mikulka' of git@rtime.felk.cvut.cz:arc into mikulka
[arc.git] / include / debug.h
index 2cb3d3f2533d34d80052074f839098f3f8f5e018..b552563bba3bf512214a33ceeadaf033d0c1225b 100644 (file)
@@ -1,30 +1,32 @@
-/* -------------------------------- Arctic Core ------------------------------
- * Arctic Core - the open source AUTOSAR platform http://arccore.com
- *
- * Copyright (C) 2009  ArcCore AB <contact@arccore.com>
- *
- * This source code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * for more details.
- * -------------------------------- Arctic Core ------------------------------*/
-
-
-
-#ifndef TRACE_H_\r
-#define TRACE_H_\r
-
+/* -------------------------------- Arctic Core ------------------------------\r
+ * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
+ *\r
+ * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
+ *\r
+ * This source code is free software; you can redistribute it and/or modify it\r
+ * under the terms of the GNU General Public License version 2 as published by the\r
+ * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.\r
+ *\r
+ * This program is distributed in the hope that it will be useful, but\r
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\r
+ * for more details.\r
+ * -------------------------------- Arctic Core ------------------------------*/\r
+\r
+\r
+// PC-Lint Exception to MISRA rule 19.12: stdio ok in debug.h.\r
+//lint -e(829)\r
+\r
+\r
+#ifndef DEBUG_H_\r
+#define DEBUG_H_\r
 \r
 /**\r
  *\r
  * NOTE!!!!\r
  * Do not use this in a header file. Should be used in the *.c file like this.\r
  *\r
- * #define USE_TRACE\r
+ * #define USE_DEBUG_PRINTF\r
  * #include "debug.h"\r
  *\r
  * Macro's for debugging and tracing\r
  *   TODO:\r
  *\r
  */\r
-
-#include <stdio.h>
+\r
+#include <stdio.h>\r
 \r
 #define DEBUG_LOW              1\r
 #define DEBUG_MEDIUM   2\r
 #define DEBUG_HIGH             3\r
+#define DEBUG_NONE             4\r
 \r
 #ifndef DEBUG_LVL\r
 #define DEBUG_LVL              2\r
@@ -58,7 +61,7 @@
 \r
 #define CH_ISR         0\r
 #define CH_PROC                1\r
-
+\r
 \r
 #if defined(USE_DEBUG_PRINTF)\r
 #define DEBUG(_level,...) \\r
 #endif\r
 \r
 #if defined(USE_LDEBUG_PRINTF)\r
-#define LDEBUG_PRINTF(format,...) printf(format,## __VA_ARGS__ )\r
+#define LDEBUG_PRINTF(format,...)      printf(format,## __VA_ARGS__ )\r
+#define LDEBUG_FPUTS(_str)                     fputs((_str),stdout)\r
 #else\r
 #define LDEBUG_PRINTF(format,...)\r
+#define LDEBUG_FPUTS(_str)\r
 #endif\r
 \r
 \r
-#endif /*RAMLOG_H_*/\r
+#endif /*DEBUG_H_*/\r