diff options
author | Anton Lundin <glance@acc.umu.se> | 2015-08-21 00:19:45 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-08-20 22:59:54 -0700 |
commit | 8d73e4f81c384c36e5ed3b8848253fd1e0b70692 (patch) | |
tree | e1860dd7367b1281211665f01dcfaacc397c6f54 /libdivecomputer.c | |
parent | e2c98def2699c6ed4b98633f780ef3faaf903335 (diff) | |
download | subsurface-8d73e4f81c384c36e5ed3b8848253fd1e0b70692.tar.gz |
Connect up serial_ftdi custom serial
This connects the serial_ftdi implementation to subsurface, and builds
libftdi1 for the android builds.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'libdivecomputer.c')
-rw-r--r-- | libdivecomputer.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c index 64e76e389..bbabb1c1c 100644 --- a/libdivecomputer.c +++ b/libdivecomputer.c @@ -925,10 +925,17 @@ const char *do_libdivecomputer_import(device_data_t *data) err = translate("gettextFromC", "Unable to open %s %s (%s)"); #if defined(SSRF_CUSTOM_SERIAL) - if (data->bluetooth_mode) { - dc_serial_t *serial_device; + dc_serial_t *serial_device = NULL; + if (data->bluetooth_mode) { rc = dc_serial_qt_open(&serial_device, data->context, data->devname); +#ifdef SERIAL_FTDI + } else if (!strcmp(data->devname, "ftdi")) { + rc = dc_serial_ftdi_open(&serial_device, data->context); +#endif + } + + if (serial_device) { if (rc == DC_STATUS_SUCCESS) { rc = dc_device_custom_open(&data->device, data->context, data->descriptor, serial_device); } else { |