summaryrefslogtreecommitdiffstats
path: root/core/libdivecomputer.h
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2016-09-17 17:27:56 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-09-17 15:47:37 -0700
commitffa3c4859327a78288cfb74e633ac3845a86ed86 (patch)
tree2576d8a298875a750f7b05ba9bd5bfebdeff9335 /core/libdivecomputer.h
parent1219dc693170e4a04fff992bd5aed990674779c1 (diff)
downloadsubsurface-ffa3c4859327a78288cfb74e633ac3845a86ed86.tar.gz
Rewrite libdivecomputer custom serial code
This rewrites the custom serial code to use the new api which I implemented in the Subsurface-branch of libdivecomputer. This is a bit to big patch but I haven't had the time to break it down into more sensible patches. This rewrite enables us to support more ftdi based divecomputer communication and is tested with both a OSTC3, OSTC2N and a Suunto Vyper, all over the libftdi driver. The bluetooth code paths are tested to, and should work as before. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/libdivecomputer.h')
-rw-r--r--core/libdivecomputer.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/libdivecomputer.h b/core/libdivecomputer.h
index f52f6959a..f2894b0c4 100644
--- a/core/libdivecomputer.h
+++ b/core/libdivecomputer.h
@@ -10,6 +10,7 @@
#include <libdivecomputer/version.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
+#include <libdivecomputer/custom_serial.h>
#include "dive.h"
@@ -59,8 +60,11 @@ extern char *logfile_name;
extern char *dumpfile_name;
#if SSRF_CUSTOM_SERIAL
-extern dc_status_t dc_serial_qt_open(dc_serial_t **out, dc_context_t *context, const char *devaddr);
-extern dc_status_t dc_serial_ftdi_open(dc_serial_t **out, dc_context_t *context);
+// WTF. this symbol never shows up at link time
+//extern dc_custom_serial_t qt_serial_ops;
+// Thats why I've worked around it with a stupid helper returning it.
+dc_custom_serial_t* get_qt_serial_ops();
+extern dc_custom_serial_t serial_ftdi_ops;
#endif
#ifdef __cplusplus