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>
This commit is contained in:
Anton Lundin 2015-08-21 00:19:45 +02:00 committed by Dirk Hohndel
parent e2c98def26
commit 8d73e4f81c
4 changed files with 43 additions and 2 deletions

View file

@ -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 {