BLE HID keyboard with gesture

Dependencies:   BLE_API BLE_HID PAJ7620U2 mbed nRF51822

https://mtmtechblog.files.wordpress.com/2017/01/mtsense04-pi-on-mbed.jpeg We have full tutorial, please visit our blog

Revision:
3:656f8fb89f05
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debug.h	Tue Jan 17 03:53:35 2017 +0000
@@ -0,0 +1,32 @@
+#ifndef __DEBUG_H__
+#define __DEBUG_H__
+
+#include "Serial.h"
+
+
+#define ENABLE_LOG      1
+#define ENABLE_ASSERT   1
+
+extern Serial dbg;
+
+
+#if ENABLE_LOG
+#define log(...) dbg.printf(__VA_ARGS__)
+#else
+#define log(...)
+#endif
+
+#if ENABLE_ASSERT
+#define assert(expr) { \
+    if (!(expr)) { \
+        dbg.printf("ASSERT: %s, file %s, line %d\n", #expr, __FILE__, __LINE__); \
+        while(1); \
+    } \
+}
+#else
+#define assert(expr)
+#endif
+
+
+#endif
+