BLE HID keyboard with gesture
Dependencies: BLE_API BLE_HID PAJ7620U2 mbed nRF51822
We have full tutorial, please visit our blog
debug.h@3:656f8fb89f05, 2017-01-17 (annotated)
- Committer:
- bcc6
- Date:
- Tue Jan 17 03:53:35 2017 +0000
- Revision:
- 3:656f8fb89f05
After reset, purge all bonding state.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bcc6 | 3:656f8fb89f05 | 1 | #ifndef __DEBUG_H__ |
bcc6 | 3:656f8fb89f05 | 2 | #define __DEBUG_H__ |
bcc6 | 3:656f8fb89f05 | 3 | |
bcc6 | 3:656f8fb89f05 | 4 | #include "Serial.h" |
bcc6 | 3:656f8fb89f05 | 5 | |
bcc6 | 3:656f8fb89f05 | 6 | |
bcc6 | 3:656f8fb89f05 | 7 | #define ENABLE_LOG 1 |
bcc6 | 3:656f8fb89f05 | 8 | #define ENABLE_ASSERT 1 |
bcc6 | 3:656f8fb89f05 | 9 | |
bcc6 | 3:656f8fb89f05 | 10 | extern Serial dbg; |
bcc6 | 3:656f8fb89f05 | 11 | |
bcc6 | 3:656f8fb89f05 | 12 | |
bcc6 | 3:656f8fb89f05 | 13 | #if ENABLE_LOG |
bcc6 | 3:656f8fb89f05 | 14 | #define log(...) dbg.printf(__VA_ARGS__) |
bcc6 | 3:656f8fb89f05 | 15 | #else |
bcc6 | 3:656f8fb89f05 | 16 | #define log(...) |
bcc6 | 3:656f8fb89f05 | 17 | #endif |
bcc6 | 3:656f8fb89f05 | 18 | |
bcc6 | 3:656f8fb89f05 | 19 | #if ENABLE_ASSERT |
bcc6 | 3:656f8fb89f05 | 20 | #define assert(expr) { \ |
bcc6 | 3:656f8fb89f05 | 21 | if (!(expr)) { \ |
bcc6 | 3:656f8fb89f05 | 22 | dbg.printf("ASSERT: %s, file %s, line %d\n", #expr, __FILE__, __LINE__); \ |
bcc6 | 3:656f8fb89f05 | 23 | while(1); \ |
bcc6 | 3:656f8fb89f05 | 24 | } \ |
bcc6 | 3:656f8fb89f05 | 25 | } |
bcc6 | 3:656f8fb89f05 | 26 | #else |
bcc6 | 3:656f8fb89f05 | 27 | #define assert(expr) |
bcc6 | 3:656f8fb89f05 | 28 | #endif |
bcc6 | 3:656f8fb89f05 | 29 | |
bcc6 | 3:656f8fb89f05 | 30 | |
bcc6 | 3:656f8fb89f05 | 31 | #endif |
bcc6 | 3:656f8fb89f05 | 32 |