diff --git a/src/scubapro_g2.c b/src/scubapro_g2.c index c33d902..765df6f 100644 --- a/src/scubapro_g2.c +++ b/src/scubapro_g2.c @@ -26,7 +26,9 @@ #include "scubapro_g2.h" #include "context-private.h" #include "device-private.h" +#ifdef USBHID #include "usbhid.h" +#endif #include "array.h" #include "platform.h" @@ -248,7 +250,11 @@ scubapro_g2_device_open(dc_device_t **out, dc_context_t *context, const char *na status = DC_STATUS_IO; goto error_free; } +#ifdef USBHID status = dc_usbhid_custom_io(context, id->vendor, id->device); +#else + status = DC_STATUS_UNSUPPORTED; +#endif } if (status != DC_STATUS_SUCCESS) { diff --git a/src/suunto_eonsteel.c b/src/suunto_eonsteel.c index f9ded4d..6f6c7f2 100644 --- a/src/suunto_eonsteel.c +++ b/src/suunto_eonsteel.c @@ -28,7 +28,9 @@ #include "context-private.h" #include "device-private.h" #include "array.h" +#ifdef USBHID #include "usbhid.h" +#endif #include "platform.h" #define EONSTEEL 0 @@ -769,7 +771,11 @@ suunto_eonsteel_device_open(dc_device_t **out, dc_context_t *context, const char /* We really need some way to specify USB ID's in the descriptor */ unsigned int vendor_id = 0x1493; unsigned int device_id = model ? 0x0033 : 0x0030; +#ifdef USBHID status = dc_usbhid_custom_io(context, vendor_id, device_id); +#else + status = DC_STATUS_UNSUPPORTED; +#endif } if (status != DC_STATUS_SUCCESS) {