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