Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: debug/debug.h
- Revision:
- 16:1e91753f0a01
- Child:
- 17:2b3fa9b1a05b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/debug/debug.h Thu May 02 09:24:28 2019 +0000
@@ -0,0 +1,20 @@
+/** @file
+*@brief デバッグ(teraterm表示)用のファイルです.DEBUG(引数);と打つとデバッグされます.
+*本ヘッダファイル内のDEBUG_ONをdefineしなければと全てのデバッグ機能をなくすことが出来ます.
+*/
+#ifndef TEMPLATE_COMMON_DEBUG_DEBUG_H
+#define TEMPLATE_COMMON_DEBUG_DEBUG_H
+#include "mbed.h"
+#define DEBUG_ON//デバッグ用。使わないときはコメントアウト
+
+#ifdef DEBUG_ON
+extern Serial pc;
+//printf(...)と同義
+#define DEBUG(...) pc.printf("" __VA_ARGS__);
+#else
+//DEBUGと言われても何もしない
+#define DEBUG(...)
+#endif
+
+
+#endif