Remove the handshake function from the public api.
This commit is contained in:
parent
572dfa5184
commit
be2a27c58b
@ -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);
|
||||
|
||||
13
src/device.c
13
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)
|
||||
{
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -21,7 +21,6 @@ device_close
|
||||
device_dump
|
||||
device_foreach
|
||||
device_get_type
|
||||
device_handshake
|
||||
device_read
|
||||
device_set_events
|
||||
device_set_fingerprint
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user