summaryrefslogtreecommitdiff
path: root/monitor/jlink.h
diff options
context:
space:
mode:
authorAndrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>2018-02-20 15:55:52 +0100
committerSzymon Janc <szymon.janc@codecoup.pl>2019-10-14 12:12:32 +0200
commit7ce36e236c1bdb1941242b00e1d5c7812749a2de (patch)
treec41513df163b45fcee91026263b160c395f3e56c /monitor/jlink.h
parent068bc4b0b42459457a2556963274b95a22acdedd (diff)
downloadbluez-7ce36e236c1bdb1941242b00e1d5c7812749a2de.tar.gz
monitor: Add interface for J-Link library
This adds simple interface to libjlinkarm.so which will be used to read data from RTT buffer. It was mostly made by trial and error since there is no public documentation for this library so it may lack something, but seems to work fine with few Cortex-M devices I tried.
Diffstat (limited to 'monitor/jlink.h')
-rw-r--r--monitor/jlink.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/monitor/jlink.h b/monitor/jlink.h
new file mode 100644
index 000000000..d7c76704c
--- /dev/null
+++ b/monitor/jlink.h
@@ -0,0 +1,27 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2018 Codecoup
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+int jlink_init(void);
+int jlink_connect(char *cfg);
+int jlink_start_rtt(char *cfg);
+int jlink_rtt_read(void *buf, size_t size);