Garmin: pass the model to the device_open function
We do this for a few other device where we need slightly different behavior, depending on the specific model. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0ebd5d3879
commit
e1bbdd5e65
@ -229,7 +229,7 @@ dc_device_open (dc_device_t **out, dc_context_t *context, dc_descriptor_t *descr
|
||||
|
||||
// Not merged upstream yet
|
||||
case DC_FAMILY_GARMIN:
|
||||
rc = garmin_device_open (&device, context, iostream);
|
||||
rc = garmin_device_open (&device, context, iostream, dc_descriptor_get_model (descriptor));
|
||||
break;
|
||||
case DC_FAMILY_DEEPBLU:
|
||||
rc = deepblu_device_open (&device, context, iostream);
|
||||
|
||||
@ -58,7 +58,7 @@ static const dc_device_vtable_t garmin_device_vtable = {
|
||||
};
|
||||
|
||||
dc_status_t
|
||||
garmin_device_open (dc_device_t **out, dc_context_t *context, dc_iostream_t *iostream)
|
||||
garmin_device_open (dc_device_t **out, dc_context_t *context, dc_iostream_t *iostream, unsigned int model)
|
||||
{
|
||||
dc_status_t status = DC_STATUS_SUCCESS;
|
||||
garmin_device_t *device = NULL;
|
||||
|
||||
@ -32,7 +32,7 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
dc_status_t
|
||||
garmin_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
|
||||
garmin_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream, unsigned int model);
|
||||
|
||||
dc_status_t
|
||||
garmin_parser_create (dc_parser_t **parser, dc_context_t *context);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user