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.
Dependents: kionix-kx123-hello rohm-bh1790glc-hello simple-sensor-client rohm-SensorShield-example
Fork of rohm-sensor-hal by
Revision 15:726c671efcce, committed 2019-02-27
- Comitter:
- MACRUM
- Date:
- Wed Feb 27 04:43:21 2019 +0000
- Parent:
- 14:f33e0914ea36
- Commit message:
- Fix debug print
Changed in this revision
| RegisterWriter/rohm_hal2.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/RegisterWriter/rohm_hal2.h Mon Feb 18 14:26:35 2019 +0900
+++ b/RegisterWriter/rohm_hal2.h Wed Feb 27 04:43:21 2019 +0000
@@ -32,17 +32,15 @@
#include "I2C.h" //I2C
#define USE_MBED_HARDWARE_I2C
- extern Serial pc;
- //Serial pc(USBTX, USBRX); done in main.cpp
- #define DEBUG_print(...) pc.printf(__VA_ARGS__)
- #define DEBUG_printf(...) pc.printf(__VA_ARGS__)
- #define DEBUG_println(...) pc.printf(__VA_ARGS__);pc.printf("\r\n")
+#ifdef _DEBUG
+ #define DEBUG_print(...) printf(__VA_ARGS__)
+ #define DEBUG_printf(...) printf(__VA_ARGS__)
+ #define DEBUG_println(...) printf(__VA_ARGS__);printf("\r\n")
+#else
+ #define DEBUG_print(...)
+ #define DEBUG_printf(...)
+ #define DEBUG_println(...)
#endif
-
-#if 0 //Enable/disable debug prints
- #define DEBUG_print()
- #define DEBUG_printf()
- #define DEBUG_println()
#endif
#endif /* ROHM_HAL_H */
