aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/debug.h')
-rw-r--r--native/src/debug.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/native/src/debug.h b/native/src/debug.h
index e5572e1a5..ae629b222 100644
--- a/native/src/debug.h
+++ b/native/src/debug.h
@@ -55,4 +55,15 @@ static inline void LOGI_S16_PLUS(unsigned short* string, const unsigned int leng
// usleep(10);
}
+static inline void printDebug(const char* tag, int* codes, int codesSize, int MAX_PROXIMITY_CHARS) {
+ unsigned char *buf = (unsigned char*)malloc((1 + codesSize) * sizeof(*buf));
+
+ buf[codesSize] = 0;
+ while (--codesSize >= 0)
+ buf[codesSize] = (unsigned char)codes[codesSize * MAX_PROXIMITY_CHARS];
+ LOGI("%s, WORD = %s", tag, buf);
+
+ free(buf);
+}
+
#endif // LATINIME_DEBUG_H