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.
debug/debug.h@17:2b3fa9b1a05b, 2019-05-02 (annotated)
- Committer:
- shimizuta
- Date:
- Thu May 02 09:34:57 2019 +0000
- Revision:
- 17:2b3fa9b1a05b
- Parent:
- 16:1e91753f0a01
- Child:
- 20:e30e6e175991
separate
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| shimizuta | 16:1e91753f0a01 | 1 | /** @file |
| shimizuta | 16:1e91753f0a01 | 2 | *@brief デバッグ(teraterm表示)用のファイルです.DEBUG(引数);と打つとデバッグされます. |
| shimizuta | 16:1e91753f0a01 | 3 | *本ヘッダファイル内のDEBUG_ONをdefineしなければと全てのデバッグ機能をなくすことが出来ます. |
| shimizuta | 16:1e91753f0a01 | 4 | */ |
| shimizuta | 16:1e91753f0a01 | 5 | #ifndef TEMPLATE_COMMON_DEBUG_DEBUG_H |
| shimizuta | 16:1e91753f0a01 | 6 | #define TEMPLATE_COMMON_DEBUG_DEBUG_H |
| shimizuta | 16:1e91753f0a01 | 7 | #include "mbed.h" |
| shimizuta | 17:2b3fa9b1a05b | 8 | //#define DEBUG_ON//デバッグ用。使わないときはコメントアウト |
| shimizuta | 16:1e91753f0a01 | 9 | |
| shimizuta | 16:1e91753f0a01 | 10 | #ifdef DEBUG_ON |
| shimizuta | 16:1e91753f0a01 | 11 | extern Serial pc; |
| shimizuta | 16:1e91753f0a01 | 12 | //printf(...)と同義 |
| shimizuta | 16:1e91753f0a01 | 13 | #define DEBUG(...) pc.printf("" __VA_ARGS__); |
| shimizuta | 16:1e91753f0a01 | 14 | #else |
| shimizuta | 16:1e91753f0a01 | 15 | //DEBUGと言われても何もしない |
| shimizuta | 16:1e91753f0a01 | 16 | #define DEBUG(...) |
| shimizuta | 16:1e91753f0a01 | 17 | #endif |
| shimizuta | 16:1e91753f0a01 | 18 | |
| shimizuta | 16:1e91753f0a01 | 19 | |
| shimizuta | 16:1e91753f0a01 | 20 | #endif |