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:
Linus Torvalds 2017-06-18 15:50:37 +09:00
parent fc8068c574
commit add253ca9e
6 changed files with 47 additions and 47 deletions

View file

@ -11,8 +11,8 @@
#include <libdivecomputer/version.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#ifdef SSRF_CUSTOM_SERIAL
#include <libdivecomputer/custom_serial.h>
#ifdef SSRF_CUSTOM_IO
#include <libdivecomputer/custom_io.h>
#endif
#include "dive.h"
@ -56,12 +56,12 @@ extern double progress_bar_fraction;
extern char *logfile_name;
extern char *dumpfile_name;
#if SSRF_CUSTOM_SERIAL
#if SSRF_CUSTOM_IO
// WTF. this symbol never shows up at link time
//extern dc_custom_serial_t qt_serial_ops;
//extern dc_custom_io_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;
dc_custom_io_t* get_qt_serial_ops();
extern dc_custom_io_t serial_ftdi_ops;
#endif
#ifdef __cplusplus