mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Convert to new libdivecomputer custom IO model
Instead of being "custom serial", it's a IO model that allows serial or packet modes, independently of each other (ie you can have a bluetooth device that does serial over BT rfcomm and packet-based communication over BLE GATT with the same serial operations that describe both cases). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
fc8068c574
commit
add253ca9e
6 changed files with 47 additions and 47 deletions
|
@ -632,14 +632,14 @@ QString ConfigureDiveComputer::dc_open(device_data_t *data)
|
|||
dc_context_set_logfunc(data->context, logfunc, fp);
|
||||
}
|
||||
|
||||
#if defined(SSRF_CUSTOM_SERIAL)
|
||||
#if defined(SSRF_CUSTOM_IO)
|
||||
if (data->bluetooth_mode) {
|
||||
#if defined(BT_SUPPORT) && defined(SSRF_CUSTOM_SERIAL)
|
||||
rc = dc_context_set_custom_serial(data->context, get_qt_serial_ops());
|
||||
#if defined(BT_SUPPORT) && defined(SSRF_CUSTOM_IO)
|
||||
rc = dc_context_set_custom_io(data->context, get_qt_serial_ops());
|
||||
#endif
|
||||
#ifdef SERIAL_FTDI
|
||||
} else if (!strcmp(data->devname, "ftdi")) {
|
||||
rc = dc_context_set_custom_serial(data->context, &serial_ftdi_ops);
|
||||
rc = dc_context_set_custom_io(data->context, &serial_ftdi_ops);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue