Contourdesign: Implement USB probe/match
This commit is contained in:
parent
a8f5f5636f
commit
da9ed129e3
@ -97,6 +97,15 @@ ContourDesignControlProtocol::available ()
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
ContourDesignControlProtocol::match_usb (uint16_t vendor, uint16_t p)
|
||||||
|
{
|
||||||
|
if (vendor != ContourDesign) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return (p == ShuttlePRO_id || p == ShuttlePRO_v2_id || p == ShuttleXpress_id);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ContourDesignControlProtocol::set_active (bool yn)
|
ContourDesignControlProtocol::set_active (bool yn)
|
||||||
{
|
{
|
||||||
|
@ -85,6 +85,7 @@ public:
|
|||||||
DeviceType device_type() const { return _device_type; }
|
DeviceType device_type() const { return _device_type; }
|
||||||
|
|
||||||
static bool available ();
|
static bool available ();
|
||||||
|
static bool match_usb (uint16_t, uint16_t);
|
||||||
|
|
||||||
int set_active (bool yn);
|
int set_active (bool yn);
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ static ControlProtocolDescriptor contourdesign_descriptor = {
|
|||||||
/* module */ 0,
|
/* module */ 0,
|
||||||
/* available */ ContourDesignControlProtocol::available,
|
/* available */ ContourDesignControlProtocol::available,
|
||||||
/* probe port */ 0,
|
/* probe port */ 0,
|
||||||
/* match usb */ 0,
|
/* match usb */ ContourDesignControlProtocol::match_usb,
|
||||||
/* initialize */ new_contourdesign_protocol,
|
/* initialize */ new_contourdesign_protocol,
|
||||||
/* destroy */ delete_contourdesign_protocol,
|
/* destroy */ delete_contourdesign_protocol,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user