Merge the typedef with the struct declaration.
This commit is contained in:
parent
6abfa9792d
commit
c1745cc535
@ -48,13 +48,11 @@
|
||||
#define RB_FREEDIVES_BEGIN 0x3400
|
||||
#define RB_FREEDIVES_END 0x4000
|
||||
|
||||
typedef struct mares_nemo_device_t mares_nemo_device_t;
|
||||
|
||||
struct mares_nemo_device_t {
|
||||
typedef struct mares_nemo_device_t {
|
||||
device_t base;
|
||||
struct serial *port;
|
||||
unsigned char fingerprint[FP_SIZE];
|
||||
};
|
||||
} mares_nemo_device_t;
|
||||
|
||||
static device_status_t mares_nemo_device_set_fingerprint (device_t *abstract, const unsigned char data[], unsigned int size);
|
||||
static device_status_t mares_nemo_device_dump (device_t *abstract, unsigned char data[], unsigned int size, unsigned int *result);
|
||||
|
||||
@ -42,12 +42,10 @@
|
||||
|
||||
#define MAXRETRIES 4
|
||||
|
||||
typedef struct mares_puck_device_t mares_puck_device_t;
|
||||
|
||||
struct mares_puck_device_t {
|
||||
typedef struct mares_puck_device_t {
|
||||
device_t base;
|
||||
struct serial *port;
|
||||
};
|
||||
} mares_puck_device_t;
|
||||
|
||||
static device_status_t mares_puck_device_read (device_t *abstract, unsigned int address, unsigned char data[], unsigned int size);
|
||||
static device_status_t mares_puck_device_dump (device_t *abstract, unsigned char data[], unsigned int size, unsigned int *result);
|
||||
|
||||
@ -61,13 +61,10 @@
|
||||
#define PT_PROFILE_FIRST(x) ( (x)[5] + (((x)[6] & 0x0F) << 8) )
|
||||
#define PT_PROFILE_LAST(x) ( ((x)[6] >> 4) + ((x)[7] << 4) )
|
||||
|
||||
|
||||
typedef struct oceanic_atom2_device_t oceanic_atom2_device_t;
|
||||
|
||||
struct oceanic_atom2_device_t {
|
||||
typedef struct oceanic_atom2_device_t {
|
||||
device_t base;
|
||||
struct serial *port;
|
||||
};
|
||||
} oceanic_atom2_device_t;
|
||||
|
||||
static device_status_t oceanic_atom2_device_version (device_t *abstract, unsigned char data[], unsigned int size);
|
||||
static device_status_t oceanic_atom2_device_read (device_t *abstract, unsigned int address, unsigned char data[], unsigned int size);
|
||||
|
||||
@ -61,13 +61,11 @@
|
||||
#define PT_PROFILE_FIRST(x) ( (x)[4] + (((x)[5] & 0x0F) << 8) )
|
||||
#define PT_PROFILE_LAST(x) ( (x)[6] + (((x)[7] & 0x0F) << 8) )
|
||||
|
||||
typedef struct oceanic_veo250_device_t oceanic_veo250_device_t;
|
||||
|
||||
struct oceanic_veo250_device_t {
|
||||
typedef struct oceanic_veo250_device_t {
|
||||
device_t base;
|
||||
struct serial *port;
|
||||
unsigned int last;
|
||||
};
|
||||
} oceanic_veo250_device_t;
|
||||
|
||||
static device_status_t oceanic_veo250_device_version (device_t *abstract, unsigned char data[], unsigned int size);
|
||||
static device_status_t oceanic_veo250_device_read (device_t *abstract, unsigned int address, unsigned char data[], unsigned int size);
|
||||
|
||||
@ -45,13 +45,10 @@
|
||||
#define ACK 0x5A
|
||||
#define NAK 0xA5
|
||||
|
||||
|
||||
typedef struct oceanic_vtpro_device_t oceanic_vtpro_device_t;
|
||||
|
||||
struct oceanic_vtpro_device_t {
|
||||
typedef struct oceanic_vtpro_device_t {
|
||||
device_t base;
|
||||
struct serial *port;
|
||||
};
|
||||
} oceanic_vtpro_device_t;
|
||||
|
||||
static device_status_t oceanic_vtpro_device_version (device_t *abstract, unsigned char data[], unsigned int size);
|
||||
static device_status_t oceanic_vtpro_device_read (device_t *abstract, unsigned int address, unsigned char data[], unsigned int size);
|
||||
|
||||
@ -41,17 +41,14 @@
|
||||
rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \
|
||||
)
|
||||
|
||||
|
||||
typedef struct reefnet_sensus_device_t reefnet_sensus_device_t;
|
||||
|
||||
struct reefnet_sensus_device_t {
|
||||
typedef struct reefnet_sensus_device_t {
|
||||
device_t base;
|
||||
struct serial *port;
|
||||
unsigned int waiting;
|
||||
unsigned int timestamp;
|
||||
unsigned int devtime;
|
||||
time_t systime;
|
||||
};
|
||||
} reefnet_sensus_device_t;
|
||||
|
||||
static device_status_t reefnet_sensus_device_set_fingerprint (device_t *abstract, const unsigned char data[], unsigned int size);
|
||||
static device_status_t reefnet_sensus_device_handshake (device_t *abstract, unsigned char *data, unsigned int size);
|
||||
|
||||
@ -40,16 +40,13 @@
|
||||
rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \
|
||||
)
|
||||
|
||||
|
||||
typedef struct reefnet_sensuspro_device_t reefnet_sensuspro_device_t;
|
||||
|
||||
struct reefnet_sensuspro_device_t {
|
||||
typedef struct reefnet_sensuspro_device_t {
|
||||
device_t base;
|
||||
struct serial *port;
|
||||
unsigned int timestamp;
|
||||
unsigned int devtime;
|
||||
time_t systime;
|
||||
};
|
||||
} reefnet_sensuspro_device_t;
|
||||
|
||||
static device_status_t reefnet_sensuspro_device_set_fingerprint (device_t *abstract, const unsigned char data[], unsigned int size);
|
||||
static device_status_t reefnet_sensuspro_device_handshake (device_t *abstract, unsigned char *data, unsigned int size);
|
||||
|
||||
@ -45,16 +45,14 @@
|
||||
#define ACCEPT PROMPT
|
||||
#define REJECT 0x00
|
||||
|
||||
typedef struct reefnet_sensusultra_device_t reefnet_sensusultra_device_t;
|
||||
|
||||
struct reefnet_sensusultra_device_t {
|
||||
typedef struct reefnet_sensusultra_device_t {
|
||||
device_t base;
|
||||
struct serial *port;
|
||||
unsigned int maxretries;
|
||||
unsigned int timestamp;
|
||||
unsigned int devtime;
|
||||
time_t systime;
|
||||
};
|
||||
} reefnet_sensusultra_device_t;
|
||||
|
||||
static device_status_t reefnet_sensusultra_device_set_fingerprint (device_t *abstract, const unsigned char data[], unsigned int size);
|
||||
static device_status_t reefnet_sensusultra_device_handshake (device_t *abstract, unsigned char *data, unsigned int size);
|
||||
|
||||
@ -55,14 +55,11 @@
|
||||
#define FP_OFFSET 0x15
|
||||
#define FP_SIZE 7
|
||||
|
||||
|
||||
typedef struct suunto_d9_device_t suunto_d9_device_t;
|
||||
|
||||
struct suunto_d9_device_t {
|
||||
typedef struct suunto_d9_device_t {
|
||||
device_t base;
|
||||
struct serial *port;
|
||||
unsigned char fingerprint[FP_SIZE];
|
||||
};
|
||||
} suunto_d9_device_t;
|
||||
|
||||
static device_status_t suunto_d9_device_set_fingerprint (device_t *abstract, const unsigned char data[], unsigned int size);
|
||||
static device_status_t suunto_d9_device_version (device_t *abstract, unsigned char data[], unsigned int size);
|
||||
|
||||
@ -44,13 +44,11 @@
|
||||
#define FP_OFFSET 6
|
||||
#define FP_SIZE 5
|
||||
|
||||
typedef struct suunto_eon_device_t suunto_eon_device_t;
|
||||
|
||||
struct suunto_eon_device_t {
|
||||
typedef struct suunto_eon_device_t {
|
||||
device_t base;
|
||||
struct serial *port;
|
||||
unsigned char fingerprint[FP_SIZE];
|
||||
};
|
||||
} suunto_eon_device_t;
|
||||
|
||||
static device_status_t suunto_eon_device_set_fingerprint (device_t *abstract, const unsigned char data[], unsigned int size);
|
||||
static device_status_t suunto_eon_device_dump (device_t *abstract, unsigned char data[], unsigned int size, unsigned int *result);
|
||||
|
||||
@ -42,12 +42,10 @@
|
||||
#define RB_PROFILE_BEGIN 0x020
|
||||
#define RB_PROFILE_END 0x100
|
||||
|
||||
typedef struct suunto_solution_device_t suunto_solution_device_t;
|
||||
|
||||
struct suunto_solution_device_t {
|
||||
typedef struct suunto_solution_device_t {
|
||||
device_t base;
|
||||
struct serial *port;
|
||||
};
|
||||
} suunto_solution_device_t;
|
||||
|
||||
static device_status_t suunto_solution_device_dump (device_t *abstract, unsigned char data[], unsigned int size, unsigned int *result);
|
||||
static device_status_t suunto_solution_device_foreach (device_t *abstract, dive_callback_t callback, void *userdata);
|
||||
|
||||
@ -48,14 +48,12 @@
|
||||
#define FP_OFFSET_SPYDER 7
|
||||
#define FP_SIZE 5
|
||||
|
||||
typedef struct suunto_vyper_device_t suunto_vyper_device_t;
|
||||
|
||||
struct suunto_vyper_device_t {
|
||||
typedef struct suunto_vyper_device_t {
|
||||
device_t base;
|
||||
struct serial *port;
|
||||
unsigned int delay;
|
||||
unsigned char fingerprint[FP_SIZE];
|
||||
};
|
||||
} suunto_vyper_device_t;
|
||||
|
||||
static device_status_t suunto_vyper_device_set_fingerprint (device_t *abstract, const unsigned char data[], unsigned int size);
|
||||
static device_status_t suunto_vyper_device_read (device_t *abstract, unsigned int address, unsigned char data[], unsigned int size);
|
||||
|
||||
@ -55,14 +55,11 @@
|
||||
#define FP_OFFSET 0x15
|
||||
#define FP_SIZE 7
|
||||
|
||||
|
||||
typedef struct suunto_vyper2_device_t suunto_vyper2_device_t;
|
||||
|
||||
struct suunto_vyper2_device_t {
|
||||
typedef struct suunto_vyper2_device_t {
|
||||
device_t base;
|
||||
struct serial *port;
|
||||
unsigned char fingerprint[FP_SIZE];
|
||||
};
|
||||
} suunto_vyper2_device_t;
|
||||
|
||||
static device_status_t suunto_vyper2_device_set_fingerprint (device_t *abstract, const unsigned char data[], unsigned int size);
|
||||
static device_status_t suunto_vyper2_device_version (device_t *abstract, unsigned char data[], unsigned int size);
|
||||
|
||||
@ -49,15 +49,13 @@
|
||||
|
||||
#define HEADER 4
|
||||
|
||||
typedef struct uwatec_aladin_device_t uwatec_aladin_device_t;
|
||||
|
||||
struct uwatec_aladin_device_t {
|
||||
typedef struct uwatec_aladin_device_t {
|
||||
device_t base;
|
||||
struct serial *port;
|
||||
unsigned int timestamp;
|
||||
unsigned int devtime;
|
||||
time_t systime;
|
||||
};
|
||||
} uwatec_aladin_device_t ;
|
||||
|
||||
static device_status_t uwatec_aladin_device_set_fingerprint (device_t *abstract, const unsigned char data[], unsigned int size);
|
||||
static device_status_t uwatec_aladin_device_dump (device_t *abstract, unsigned char data[], unsigned int size, unsigned int *result);
|
||||
|
||||
@ -44,15 +44,13 @@
|
||||
#define ACK 0x60
|
||||
#define NAK 0xA8
|
||||
|
||||
typedef struct uwatec_memomouse_device_t uwatec_memomouse_device_t;
|
||||
|
||||
struct uwatec_memomouse_device_t {
|
||||
typedef struct uwatec_memomouse_device_t {
|
||||
device_t base;
|
||||
struct serial *port;
|
||||
unsigned int timestamp;
|
||||
unsigned int devtime;
|
||||
time_t systime;
|
||||
};
|
||||
} uwatec_memomouse_device_t;
|
||||
|
||||
static device_status_t uwatec_memomouse_device_set_fingerprint (device_t *device, const unsigned char data[], unsigned int size);
|
||||
static device_status_t uwatec_memomouse_device_dump (device_t *abstract, unsigned char data[], unsigned int size, unsigned int *result);
|
||||
|
||||
@ -40,16 +40,14 @@
|
||||
rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \
|
||||
)
|
||||
|
||||
typedef struct uwatec_smart_device_t uwatec_smart_device_t;
|
||||
|
||||
struct uwatec_smart_device_t {
|
||||
typedef struct uwatec_smart_device_t {
|
||||
device_t base;
|
||||
struct irda *socket;
|
||||
unsigned int address;
|
||||
unsigned int timestamp;
|
||||
unsigned int devtime;
|
||||
time_t systime;
|
||||
};
|
||||
} uwatec_smart_device_t;
|
||||
|
||||
static device_status_t uwatec_smart_device_set_fingerprint (device_t *device, const unsigned char data[], unsigned int size);
|
||||
static device_status_t uwatec_smart_device_dump (device_t *abstract, unsigned char data[], unsigned int size, unsigned int *result);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user