aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-30 19:35:46 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-30 19:35:46 +0200
commit5747d262fd4eebd89ebfbb33f1571da859feeef1 (patch)
treecc387a8d4ed7fb702db002f60819c2f1de06a8f8
parentb163a32544893e91fd0613a49ed09b289e833cf0 (diff)
Update device names
-rw-r--r--usb_darwin.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/usb_darwin.go b/usb_darwin.go
index 3e489d8..1a54bdd 100644
--- a/usb_darwin.go
+++ b/usb_darwin.go
@@ -15,10 +15,11 @@ type USB struct {
var (
graphtec = usb.ID(0x0b4d)
- cc200_20 = usb.ID(0x110a)
- cc300_20 = usb.ID(0x111a)
- silhouette_sd_1 = usb.ID(0x111c)
- silhouette_sd_2 = usb.ID(0x111d)
+ craftrobo = usb.ID(0x110a)
+ craftrobolite = usb.ID(0x111a)
+ silhouette = usb.ID(0x111c)
+ silhouette_sd = usb.ID(0x111d)
+ silhouette_cameo = usb.ID(0x1121)
silhouette_portrait = usb.ID(0x1123)
debug = 3
)
@@ -29,13 +30,12 @@ func init() {
usb.DefaultWriteTimeout *= 300
}
-func cc100(desc *usb.Descriptor) bool {
+func match(desc *usb.Descriptor) bool {
if desc.Vendor == graphtec {
switch desc.Product {
- case cc200_20, cc300_20,
- silhouette_sd_1,
- silhouette_sd_2,
- silhouette_portrait:
+ case craftrobo, craftrobolite,
+ silhouette, silhouette_sd,
+ silhouette_cameo, silhouette_portrait:
return true
}
}
@@ -45,7 +45,7 @@ func cc100(desc *usb.Descriptor) bool {
func NewUSB() (USB, error) {
ctx := usb.NewContext()
ctx.Debug(debug)
- devs, err := ctx.ListDevices(cc100)
+ devs, err := ctx.ListDevices(match)
if err != nil {
log.Fatal(err)
}