Changeset d58de37 in subsurface


Ignore:
Timestamp:
Jun 22, 2017, 5:41:21 PM (5 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
63a4a75
Parents:
83e56cbf (diff), add253c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of git://github.com/torvalds/subsurface-for-dirk

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • core/configuredivecomputer.cpp

    rb368ecd radd253c  
    633633        }
    634634
    635 #if defined(SSRF_CUSTOM_SERIAL)
     635#if defined(SSRF_CUSTOM_IO)
    636636        if (data->bluetooth_mode) {
    637 #if defined(BT_SUPPORT) && defined(SSRF_CUSTOM_SERIAL)
    638                 rc = dc_context_set_custom_serial(data->context, get_qt_serial_ops());
     637#if defined(BT_SUPPORT) && defined(SSRF_CUSTOM_IO)
     638                rc = dc_context_set_custom_io(data->context, get_qt_serial_ops());
    639639#endif
    640640#ifdef SERIAL_FTDI
    641641        } else if (!strcmp(data->devname, "ftdi")) {
    642                 rc = dc_context_set_custom_serial(data->context, &serial_ftdi_ops);
     642                rc = dc_context_set_custom_io(data->context, &serial_ftdi_ops);
    643643#endif
    644644        }
  • core/libdivecomputer.c

    rcbe03fd8 radd253c  
    10791079        err = translate("gettextFromC", "Unable to open %s %s (%s)");
    10801080
    1081 #if defined(SSRF_CUSTOM_SERIAL)
     1081#if defined(SSRF_CUSTOM_IO)
    10821082        if (data->bluetooth_mode) {
    1083 #if defined(BT_SUPPORT) && defined(SSRF_CUSTOM_SERIAL)
    1084                 rc = dc_context_set_custom_serial(data->context, get_qt_serial_ops());
     1083#if defined(BT_SUPPORT) && defined(SSRF_CUSTOM_IO)
     1084                rc = dc_context_set_custom_io(data->context, get_qt_serial_ops());
    10851085#endif
    10861086#ifdef SERIAL_FTDI
    10871087        } else if (!strcmp(data->devname, "ftdi")) {
    1088                 rc = dc_context_set_custom_serial(data->context, &serial_ftdi_ops);
     1088                rc = dc_context_set_custom_io(data->context, &serial_ftdi_ops);
    10891089                INFO(0, "setting up ftdi ops");
    10901090#else
  • core/libdivecomputer.h

    r6399eaf radd253c  
    1212#include <libdivecomputer/device.h>
    1313#include <libdivecomputer/parser.h>
    14 #ifdef SSRF_CUSTOM_SERIAL
    15 #include <libdivecomputer/custom_serial.h>
     14#ifdef SSRF_CUSTOM_IO
     15#include <libdivecomputer/custom_io.h>
    1616#endif
    1717
     
    5757extern char *dumpfile_name;
    5858
    59 #if SSRF_CUSTOM_SERIAL
     59#if SSRF_CUSTOM_IO
    6060// WTF. this symbol never shows up at link time
    61 //extern dc_custom_serial_t qt_serial_ops;
     61//extern dc_custom_io_t qt_serial_ops;
    6262// Thats why I've worked around it with a stupid helper returning it.
    63 dc_custom_serial_t* get_qt_serial_ops();
    64 extern dc_custom_serial_t serial_ftdi_ops;
     63dc_custom_io_t* get_qt_serial_ops();
     64extern dc_custom_io_t serial_ftdi_ops;
    6565#endif
    6666
  • core/qtserialbluetooth.cpp

    r02d3289 radd253c  
    1010#include <libdivecomputer/version.h>
    1111
    12 #if defined(SSRF_CUSTOM_SERIAL)
     12#if defined(SSRF_CUSTOM_IO)
    1313
    1414#if defined(Q_OS_WIN)
     
    1818#endif
    1919
    20 #include <libdivecomputer/custom_serial.h>
     20#include <libdivecomputer/custom_io.h>
    2121
    2222QList<QBluetoothUuid> registeredUuids;
     
    400400}
    401401
    402 dc_custom_serial_t qt_serial_ops = {
     402dc_custom_io_t qt_serial_ops = {
    403403        .userdata = NULL,
    404         .open = qt_serial_open,
    405         .close = qt_serial_close,
    406         .read = qt_serial_read,
    407         .write = qt_serial_write,
    408         .purge = qt_serial_flush,
    409         .get_available = qt_serial_get_received,
    410         .set_timeout = qt_serial_set_timeout,
     404        .serial_open = qt_serial_open,
     405        .serial_close = qt_serial_close,
     406        .serial_read = qt_serial_read,
     407        .serial_write = qt_serial_write,
     408        .serial_purge = qt_serial_flush,
     409        .serial_get_available = qt_serial_get_received,
     410        .serial_set_timeout = qt_serial_set_timeout,
    411411// These doesn't make sense over bluetooth
    412412// NULL means NOP
    413         .configure = NULL,
    414         .set_dtr = NULL,
    415         .set_rts = NULL,
    416         .set_halfduplex = NULL,
    417         .set_break = NULL
     413        .serial_configure = NULL,
     414        .serial_set_dtr = NULL,
     415        .serial_set_rts = NULL,
     416        .serial_set_halfduplex = NULL,
     417        .serial_set_break = NULL
    418418};
    419419
    420 dc_custom_serial_t* get_qt_serial_ops() {
    421         return (dc_custom_serial_t*) &qt_serial_ops;
    422 }
    423 
    424 }
    425 #endif
     420dc_custom_io_t* get_qt_serial_ops() {
     421        return (dc_custom_io_t*) &qt_serial_ops;
     422}
     423
     424}
     425#endif
  • core/serial_ftdi.c

    rcbe03fd8 radd253c  
    4444#define SYSERROR(context, errcode)      ;
    4545
    46 #include <libdivecomputer/custom_serial.h>
     46#include <libdivecomputer/custom_io.h>
    4747#include <libdivecomputer/context.h>
    4848
     
    591591}
    592592
    593 dc_custom_serial_t serial_ftdi_ops = {
     593dc_custom_io_t serial_ftdi_ops = {
    594594        .userdata = NULL,
    595         .open = serial_ftdi_open,
    596         .close = serial_ftdi_close,
    597         .read = serial_ftdi_read,
    598         .write = serial_ftdi_write,
    599         .purge = serial_ftdi_flush,
    600         .get_available = serial_ftdi_get_received,
    601         .set_timeout = serial_ftdi_set_timeout,
    602         .configure = serial_ftdi_configure,
    603         .set_dtr = serial_ftdi_set_dtr,
    604         .set_rts = serial_ftdi_set_rts,
    605         .set_halfduplex = serial_ftdi_set_halfduplex,
     595        .serial_open = serial_ftdi_open,
     596        .serial_close = serial_ftdi_close,
     597        .serial_read = serial_ftdi_read,
     598        .serial_write = serial_ftdi_write,
     599        .serial_purge = serial_ftdi_flush,
     600        .serial_get_available = serial_ftdi_get_received,
     601        .serial_set_timeout = serial_ftdi_set_timeout,
     602        .serial_configure = serial_ftdi_configure,
     603        .serial_set_dtr = serial_ftdi_set_dtr,
     604        .serial_set_rts = serial_ftdi_set_rts,
     605        .serial_set_halfduplex = serial_ftdi_set_halfduplex,
    606606// Can't be done in ftdi?
    607607// only used in vyper2
    608608// NULL means NOP
    609         .set_break = NULL
     609        .serial_set_break = NULL
    610610};
  • desktop-widgets/downloadfromdivecomputer.cpp

    r816863d radd253c  
    8888        ui.downloadCancelRetryButton->setText(tr("Download"));
    8989
    90 #if defined(BT_SUPPORT) && defined(SSRF_CUSTOM_SERIAL)
     90#if defined(BT_SUPPORT) && defined(SSRF_CUSTOM_IO)
    9191        ui.bluetoothMode->setText(tr("Choose Bluetooth download mode"));
    9292        ui.bluetoothMode->setChecked(dc->downloadMode() == DC_TRANSPORT_BLUETOOTH);
     
    294294        dc->setDevice(data->devName());
    295295
    296 #if defined(BT_SUPPORT) && defined(SSRF_CUSTOM_SERIAL)
     296#if defined(BT_SUPPORT) && defined(SSRF_CUSTOM_IO)
    297297        dc->setDownloadMode(ui.bluetoothMode->isChecked() ? DC_TRANSPORT_BLUETOOTH : DC_TRANSPORT_SERIAL);
    298298#endif
Note: See TracChangeset for help on using the changeset viewer.