am7xxx: add support for Acer C112
[libam7xxx.git] / src / am7xxx.c
index 8087f89..ae6de0f 100644 (file)
@@ -77,6 +77,11 @@ static struct am7xxx_usb_device_descriptor supported_devices[] = {
                .product_id = 0xc101,
        },
        {
+               .name       = "Acer C112",
+               .vendor_id  = 0x1de1,
+               .product_id = 0x5501,
+       },
+       {
                .name       = "Philips/Sagemcom PicoPix 1020",
                .vendor_id  = 0x21e7,
                .product_id = 0x000e,
@@ -294,7 +299,7 @@ static int send_data(am7xxx_device *dev, uint8_t *buffer, unsigned int len)
 
        trace_dump_buffer(dev->ctx, "sending -->", buffer, len);
 
-       ret = libusb_bulk_transfer(dev->usb_device, 1, buffer, len, &transferred, 0);
+       ret = libusb_bulk_transfer(dev->usb_device, 0x1, buffer, len, &transferred, 0);
        if (ret != 0 || (unsigned int)transferred != len) {
                error(dev->ctx, "ret: %d\ttransferred: %d (expected %u)\n",
                      ret, transferred, len);
@@ -542,7 +547,7 @@ static int scan_devices(am7xxx_context *ctx, scan_op op,
                                                goto out;
                                        }
 
-                                       libusb_set_configuration((*dev)->usb_device, 1);
+                                       libusb_set_configuration((*dev)->usb_device, 2);
                                        libusb_claim_interface((*dev)->usb_device, 0);
                                        goto out;
                                }