diff --git a/src/device-private.h b/src/device-private.h index 771bfad..bc4eafe 100644 --- a/src/device-private.h +++ b/src/device-private.h @@ -50,8 +50,6 @@ struct device_backend_t { device_status_t (*set_fingerprint) (device_t *device, const unsigned char data[], unsigned int size); - device_status_t (*handshake) (device_t *device, unsigned char data[], unsigned int size); - device_status_t (*version) (device_t *device, unsigned char data[], unsigned int size); device_status_t (*read) (device_t *device, unsigned int address, unsigned char data[], unsigned int size); diff --git a/src/device.c b/src/device.c index a6b4820..09d1dc7 100644 --- a/src/device.c +++ b/src/device.c @@ -73,19 +73,6 @@ device_set_fingerprint (device_t *device, const unsigned char data[], unsigned i } -device_status_t -device_handshake (device_t *device, unsigned char data[], unsigned int size) -{ - if (device == NULL) - return DEVICE_STATUS_UNSUPPORTED; - - if (device->backend->handshake == NULL) - return DEVICE_STATUS_UNSUPPORTED; - - return device->backend->handshake (device, data, size); -} - - device_status_t device_version (device_t *device, unsigned char data[], unsigned int size) { diff --git a/src/device.h b/src/device.h index 58c690e..54e7375 100644 --- a/src/device.h +++ b/src/device.h @@ -86,8 +86,6 @@ device_status_t device_set_events (device_t *device, unsigned int events, device device_status_t device_set_fingerprint (device_t *device, const unsigned char data[], unsigned int size); -device_status_t device_handshake (device_t *device, unsigned char data[], unsigned int size); - device_status_t device_version (device_t *device, unsigned char data[], unsigned int size); device_status_t device_read (device_t *device, unsigned int address, unsigned char data[], unsigned int size); diff --git a/src/libdivecomputer.symbols b/src/libdivecomputer.symbols index 76b97e7..d057d7f 100644 --- a/src/libdivecomputer.symbols +++ b/src/libdivecomputer.symbols @@ -21,7 +21,6 @@ device_close device_dump device_foreach device_get_type -device_handshake device_read device_set_events device_set_fingerprint diff --git a/src/mares_nemo.c b/src/mares_nemo.c index 08d7235..12ea878 100644 --- a/src/mares_nemo.c +++ b/src/mares_nemo.c @@ -62,7 +62,6 @@ static device_status_t mares_nemo_device_close (device_t *abstract); static const device_backend_t mares_nemo_device_backend = { DEVICE_TYPE_MARES_NEMO, mares_nemo_device_set_fingerprint, /* set_fingerprint */ - NULL, /* handshake */ NULL, /* version */ NULL, /* read */ NULL, /* write */ diff --git a/src/mares_puck.c b/src/mares_puck.c index 5ea2a51..042447e 100644 --- a/src/mares_puck.c +++ b/src/mares_puck.c @@ -54,7 +54,6 @@ static device_status_t mares_puck_device_close (device_t *abstract); static const device_backend_t mares_puck_device_backend = { DEVICE_TYPE_MARES_PUCK, NULL, /* set_fingerprint */ - NULL, /* handshake */ NULL, /* version */ mares_puck_device_read, /* read */ NULL, /* write */ diff --git a/src/oceanic_atom2.c b/src/oceanic_atom2.c index 590962d..9ed3d5d 100644 --- a/src/oceanic_atom2.c +++ b/src/oceanic_atom2.c @@ -84,7 +84,6 @@ static device_status_t oceanic_atom2_device_close (device_t *abstract); static const device_backend_t oceanic_atom2_device_backend = { DEVICE_TYPE_OCEANIC_ATOM2, oceanic_atom2_device_set_fingerprint, /* set_fingerprint */ - NULL, /* handshake */ oceanic_atom2_device_version, /* version */ oceanic_atom2_device_read, /* read */ oceanic_atom2_device_write, /* write */ diff --git a/src/oceanic_veo250.c b/src/oceanic_veo250.c index 782f08f..f4f0135 100644 --- a/src/oceanic_veo250.c +++ b/src/oceanic_veo250.c @@ -76,7 +76,6 @@ static device_status_t oceanic_veo250_device_close (device_t *abstract); static const device_backend_t oceanic_veo250_device_backend = { DEVICE_TYPE_OCEANIC_VEO250, NULL, /* set_fingerprint */ - NULL, /* handshake */ oceanic_veo250_device_version, /* version */ oceanic_veo250_device_read, /* read */ NULL, /* write */ diff --git a/src/oceanic_vtpro.c b/src/oceanic_vtpro.c index 8fadeaf..9d3d218 100644 --- a/src/oceanic_vtpro.c +++ b/src/oceanic_vtpro.c @@ -58,7 +58,6 @@ static device_status_t oceanic_vtpro_device_close (device_t *abstract); static const device_backend_t oceanic_vtpro_device_backend = { DEVICE_TYPE_OCEANIC_VTPRO, NULL, /* set_fingerprint */ - NULL, /* handshake */ oceanic_vtpro_device_version, /* version */ oceanic_vtpro_device_read, /* read */ NULL, /* write */ diff --git a/src/reefnet_sensus.c b/src/reefnet_sensus.c index 423cf8b..4f69054 100644 --- a/src/reefnet_sensus.c +++ b/src/reefnet_sensus.c @@ -59,7 +59,6 @@ static device_status_t reefnet_sensus_device_close (device_t *abstract); static const device_backend_t reefnet_sensus_device_backend = { DEVICE_TYPE_REEFNET_SENSUS, reefnet_sensus_device_set_fingerprint, /* set_fingerprint */ - NULL, /* handshake */ NULL, /* version */ NULL, /* read */ NULL, /* write */ diff --git a/src/reefnet_sensuspro.c b/src/reefnet_sensuspro.c index f4d0011..1174fe6 100644 --- a/src/reefnet_sensuspro.c +++ b/src/reefnet_sensuspro.c @@ -57,7 +57,6 @@ static device_status_t reefnet_sensuspro_device_close (device_t *abstract); static const device_backend_t reefnet_sensuspro_device_backend = { DEVICE_TYPE_REEFNET_SENSUSPRO, reefnet_sensuspro_device_set_fingerprint, /* set_fingerprint */ - NULL, /* handshake */ NULL, /* version */ NULL, /* read */ NULL, /* write */ diff --git a/src/reefnet_sensusultra.c b/src/reefnet_sensusultra.c index e7ad99e..8a4947a 100644 --- a/src/reefnet_sensusultra.c +++ b/src/reefnet_sensusultra.c @@ -63,7 +63,6 @@ static device_status_t reefnet_sensusultra_device_close (device_t *abstract); static const device_backend_t reefnet_sensusultra_device_backend = { DEVICE_TYPE_REEFNET_SENSUSULTRA, reefnet_sensusultra_device_set_fingerprint, /* set_fingerprint */ - NULL, /* handshake */ NULL, /* version */ NULL, /* read */ NULL, /* write */ diff --git a/src/suunto_d9.c b/src/suunto_d9.c index 357517b..aa244c4 100644 --- a/src/suunto_d9.c +++ b/src/suunto_d9.c @@ -72,7 +72,6 @@ static device_status_t suunto_d9_device_close (device_t *abstract); static const device_backend_t suunto_d9_device_backend = { DEVICE_TYPE_SUUNTO_D9, suunto_d9_device_set_fingerprint, /* set_fingerprint */ - NULL, /* handshake */ suunto_d9_device_version, /* version */ suunto_d9_device_read, /* read */ suunto_d9_device_write, /* write */ diff --git a/src/suunto_eon.c b/src/suunto_eon.c index 32158b7..df0a2e0 100644 --- a/src/suunto_eon.c +++ b/src/suunto_eon.c @@ -58,7 +58,6 @@ static device_status_t suunto_eon_device_close (device_t *abstract); static const device_backend_t suunto_eon_device_backend = { DEVICE_TYPE_SUUNTO_EON, suunto_eon_device_set_fingerprint, /* set_fingerprint */ - NULL, /* handshake */ NULL, /* version */ NULL, /* read */ NULL, /* write */ diff --git a/src/suunto_solution.c b/src/suunto_solution.c index e207716..0769eab 100644 --- a/src/suunto_solution.c +++ b/src/suunto_solution.c @@ -54,7 +54,6 @@ static device_status_t suunto_solution_device_close (device_t *abstract); static const device_backend_t suunto_solution_device_backend = { DEVICE_TYPE_SUUNTO_SOLUTION, NULL, /* set_fingerprint */ - NULL, /* handshake */ NULL, /* version */ NULL, /* read */ NULL, /* write */ diff --git a/src/suunto_vyper.c b/src/suunto_vyper.c index 02fa4dd..789a57f 100644 --- a/src/suunto_vyper.c +++ b/src/suunto_vyper.c @@ -65,7 +65,6 @@ static device_status_t suunto_vyper_device_close (device_t *abstract); static const device_backend_t suunto_vyper_device_backend = { DEVICE_TYPE_SUUNTO_VYPER, suunto_vyper_device_set_fingerprint, /* set_fingerprint */ - NULL, /* handshake */ NULL, /* version */ suunto_vyper_device_read, /* read */ suunto_vyper_device_write, /* write */ diff --git a/src/suunto_vyper2.c b/src/suunto_vyper2.c index 05567a6..f29d4cf 100644 --- a/src/suunto_vyper2.c +++ b/src/suunto_vyper2.c @@ -72,7 +72,6 @@ static device_status_t suunto_vyper2_device_close (device_t *abstract); static const device_backend_t suunto_vyper2_device_backend = { DEVICE_TYPE_SUUNTO_VYPER2, suunto_vyper2_device_set_fingerprint, /* set_fingerprint */ - NULL, /* handshake */ suunto_vyper2_device_version, /* version */ suunto_vyper2_device_read, /* read */ suunto_vyper2_device_write, /* write */ diff --git a/src/uwatec_aladin.c b/src/uwatec_aladin.c index 61407de..9d094d6 100644 --- a/src/uwatec_aladin.c +++ b/src/uwatec_aladin.c @@ -65,7 +65,6 @@ static device_status_t uwatec_aladin_device_close (device_t *abstract); static const device_backend_t uwatec_aladin_device_backend = { DEVICE_TYPE_UWATEC_ALADIN, uwatec_aladin_device_set_fingerprint, /* set_fingerprint */ - NULL, /* handshake */ NULL, /* version */ NULL, /* read */ NULL, /* write */ diff --git a/src/uwatec_memomouse.c b/src/uwatec_memomouse.c index b47b384..777d3d7 100644 --- a/src/uwatec_memomouse.c +++ b/src/uwatec_memomouse.c @@ -60,7 +60,6 @@ static device_status_t uwatec_memomouse_device_close (device_t *abstract); static const device_backend_t uwatec_memomouse_device_backend = { DEVICE_TYPE_UWATEC_MEMOMOUSE, uwatec_memomouse_device_set_fingerprint, /* set_fingerprint */ - NULL, /* handshake */ NULL, /* version */ NULL, /* read */ NULL, /* write */ diff --git a/src/uwatec_smart.c b/src/uwatec_smart.c index e93f92e..0e38914 100644 --- a/src/uwatec_smart.c +++ b/src/uwatec_smart.c @@ -57,7 +57,6 @@ static device_status_t uwatec_smart_device_close (device_t *abstract); static const device_backend_t uwatec_smart_device_backend = { DEVICE_TYPE_UWATEC_SMART, uwatec_smart_device_set_fingerprint, /* set_fingerprint */ - NULL, /* handshake */ NULL, /* version */ NULL, /* read */ NULL, /* write */