diff options
author | Christof Arnosti <charno@charno.ch> | 2020-03-05 22:38:33 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-07 12:34:43 -0800 |
commit | 6e38f85ba7365efd2f27b407cf001b1e10dff1c8 (patch) | |
tree | 6504a8634b78523c02c72cf07280a01177785485 /core/libdivecomputer.c | |
parent | 6ffb1e3129a95ad30c2a1951373b1001db930ed6 (diff) | |
download | subsurface-6e38f85ba7365efd2f27b407cf001b1e10dff1c8.tar.gz |
usb-serial-for-android: Implementation
Implement the libdivecomputer API in Java and create C/JNI translation
layer.
[Dirk Hohndel: whitespace harmonization - yes, some of this is Java,
this still makes it much easier to read for me;
also changed the FTDI conditional compilation to make
sure we can still use that for mobile-on-desktop if
necessary]
Signed-off-by: Christof Arnosti <charno@charno.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/libdivecomputer.c')
-rw-r--r-- | core/libdivecomputer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index 453bb4e2f..79eb63c7f 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -1319,6 +1319,10 @@ dc_status_t divecomputer_device_open(device_data_t *data) if (!strcasecmp(data->devname, "ftdi")) return ftdi_open(&data->iostream, context); #endif +#ifdef __ANDROID__ + if (!strcasecmp(data->devname, "usb-serial")) + return serial_usb_android_open(&data->iostream, context); +#endif rc = dc_serial_open(&data->iostream, context, data->devname); if (rc == DC_STATUS_SUCCESS) return rc; |