Lines Matching defs:handle
52 prepare_interface (struct usb_device *dev, usb_dev_handle ** handle)
59 *handle = usb_open (dev);
60 if (*handle == 0)
68 usb_set_configuration (*handle, dev->config[0].bConfigurationValue);
73 usb_close (*handle);
77 result = usb_claim_interface (*handle, 0);
82 usb_close (*handle);
89 finish_interface (usb_dev_handle * handle)
91 usb_release_interface (handle, 0);
92 usb_close (handle);
100 usb_dev_handle *handle;
167 result = prepare_interface (dev, &handle);
176 usb_control_msg (handle, 0x40, 0x01, 0x2010, 0x3f40, req, 64, TIMEOUT);
182 finish_interface (handle);
186 usb_control_msg (handle, 0xc0, 0x01, 0x2011, 0x3f00, req, 64, TIMEOUT);
192 finish_interface (handle);
200 finish_interface (handle);
203 finish_interface (handle);
212 usb_dev_handle *handle;
314 result = prepare_interface (dev, &handle);
326 usb_control_msg (handle, 0x40, 0x04, 0x2012, 0x3f40, req, 64, TIMEOUT);
332 finish_interface (handle);
336 usb_control_msg (handle, 0xc0, 0x01, 0x2013, 0x3f00, req, 64, TIMEOUT);
343 usb_control_msg (handle, 0xc0, 0x01, 0x2013, 0x3f00, req, 8, TIMEOUT);
349 finish_interface (handle);
359 finish_interface (handle);
362 finish_interface (handle);
371 usb_dev_handle *handle;
526 result = prepare_interface (dev, &handle);
535 usb_control_msg (handle, 0xc0, 0x10, 0x41, 0x0000, req, 64, TIMEOUT);
542 finish_interface (handle);
546 usb_control_msg (handle, 0xc0, 0x10, 0x05, 0x0000, req, 64, TIMEOUT);
553 finish_interface (handle);
562 finish_interface (handle);
571 usb_dev_handle *handle;
685 result = prepare_interface (dev, &handle);
691 result = usb_bulk_write (handle, 0x01, req, 2, 1000);
696 finish_interface (handle);
699 result = usb_bulk_read (handle, 0x82, &res, 1, 1000);
704 finish_interface (handle);
709 result = usb_bulk_write (handle, 0x01, req, 2, 1000);
710 result = usb_bulk_read (handle, 0x82, &res, 1, 1000);
711 finish_interface (handle);
720 usb_dev_handle *handle;
809 result = prepare_interface (dev, &handle);
816 result = usb_bulk_write (handle, 0x02, req, 8, TIMEOUT);
821 finish_interface (handle);
824 result = usb_bulk_read (handle, 0x81, (char *) &res, 1, TIMEOUT);
829 finish_interface (handle);
836 finish_interface (handle);
839 finish_interface (handle);
849 usb_dev_handle *handle;
952 result = prepare_interface (dev, &handle);
961 result = usb_bulk_write (handle, 0x02, req, 8, TIMEOUT);
966 finish_interface (handle);
970 result = usb_bulk_read (handle, 0x81, (char *) inquiry, 0x60, TIMEOUT);
976 finish_interface (handle);
983 finish_interface (handle);
991 finish_interface (handle);
998 finish_interface (handle);
1005 lm983x_wb (usb_dev_handle * handle, unsigned char reg, unsigned char val)
1016 result = usb_bulk_write (handle, 3, (char *) buf, 5, TIMEOUT);
1024 lm983x_rb (usb_dev_handle * handle, unsigned char reg, unsigned char *val)
1034 result = usb_bulk_write (handle, 3, (char *) buf, 4, TIMEOUT);
1039 result = usb_bulk_read (handle, 2, (char *) val, 1, TIMEOUT);
1051 usb_dev_handle *handle;
1171 result = prepare_interface (dev, &handle);
1175 result = lm983x_wb (handle, 0x07, 0x00);
1177 result = lm983x_wb (handle, 0x08, 0x02);
1179 result = lm983x_rb (handle, 0x07, &val);
1181 result = lm983x_rb (handle, 0x08, &val);
1183 result = lm983x_rb (handle, 0x69, &val);
1189 finish_interface (handle);
1193 finish_interface (handle);
1216 gl646_write_reg (usb_dev_handle * handle, unsigned char reg,
1222 usb_control_msg (handle, 0x00, 0x00, 0x83, 0x00, (char *) ®, 0x01,
1228 usb_control_msg (handle, 0x00, 0x00, 0x85, 0x00, (char *) &val, 0x01,
1237 gl646_read_reg (usb_dev_handle * handle, unsigned char reg,
1243 usb_control_msg (handle, 0x00, 0x00, 0x83, 0x00, (char *) ®, 0x01,
1249 usb_control_msg (handle, 0x80, 0x00, 0x84, 0x00, (char *) val, 0x01,
1263 usb_dev_handle *handle;
1376 result = prepare_interface (dev, &handle);
1380 result = gl646_write_reg (handle, 0x38, 0x15);
1385 finish_interface (handle);
1389 result = gl646_read_reg (handle, 0x4e, &val);
1394 finish_interface (handle);
1402 finish_interface (handle);
1405 finish_interface (handle);
1415 usb_dev_handle *handle;
1528 result = prepare_interface (dev, &handle);
1532 result = gl646_write_reg (handle, 0x38, 0x15);
1537 finish_interface (handle);
1541 result = gl646_read_reg (handle, 0x4e, &val);
1546 finish_interface (handle);
1554 finish_interface (handle);
1558 finish_interface (handle);
1569 usb_dev_handle *handle;
1692 result = prepare_interface (dev, &handle);
1696 result = gl646_write_reg (handle, 0x38, 0x15);
1701 finish_interface (handle);
1705 result = gl646_read_reg (handle, 0x4e, &val);
1710 finish_interface (handle);
1718 finish_interface (handle);
1721 finish_interface (handle);
1744 usb_dev_handle *handle;
1864 result = prepare_interface (dev, &handle);
1886 result = gl646_write_reg (handle, 0x38, 0x15);
1891 finish_interface (handle);
1895 result = gl646_read_reg (handle, 0x38, &val);
1900 finish_interface (handle);
1908 finish_interface (handle);
1911 finish_interface (handle);
1940 usb_dev_handle *handle;
2108 result = prepare_interface (dev, &handle);
2112 finish_interface (handle);
2123 usb_dev_handle *handle;
2236 result = prepare_interface (dev, &handle);
2241 usb_control_msg (handle, 0x40, 0x01, 0x38, 0x01, NULL, 0, TIMEOUT);
2247 finish_interface (handle);
2252 usb_control_msg (handle, 0x40, 0x01, 0x0f, 0x00, NULL, 0, TIMEOUT);
2258 finish_interface (handle);
2263 usb_control_msg (handle, 0x40, 0x01, 0x38, 0x01, NULL, 0, TIMEOUT);
2269 finish_interface (handle);
2274 usb_control_msg (handle, 0xc0, 0x00, 0, 0x00, &data, 1, TIMEOUT);
2280 finish_interface (handle);
2288 finish_interface (handle);
2292 finish_interface (handle);
2301 usb_dev_handle *handle;
2370 result = prepare_interface (dev, &handle);
2377 usb_control_msg (handle, 0x40, 0x08, 0x34, 0x00, &data, 1, TIMEOUT);
2383 finish_interface (handle);
2389 usb_control_msg (handle, 0xc0, 0x00, 0x34, 0x00, &data, 1, TIMEOUT);
2395 finish_interface (handle);
2403 finish_interface (handle);
2407 finish_interface (handle);
2414 rts88xx_read_reg (usb_dev_handle * handle, unsigned char *req, unsigned char *res, int size)
2419 usb_bulk_write (handle, 0x02, (char *)req, 0x04, TIMEOUT);
2424 usb_bulk_read (handle, 0x81, (char *)res, size, TIMEOUT);
2436 usb_dev_handle *handle;
2547 result = prepare_interface (dev, &handle);
2557 result = rts88xx_read_reg(handle,req,res,req[3]);
2562 finish_interface (handle);
2571 finish_interface (handle);
2574 finish_interface (handle);
2583 usb_dev_handle *handle;
2694 result = prepare_interface (dev, &handle);
2704 result = rts88xx_read_reg(handle,req,res,req[3]);
2709 finish_interface (handle);
2719 finish_interface (handle);
2722 finish_interface (handle);
2731 usb_dev_handle *handle;
2874 result = prepare_interface (dev, &handle);
2884 usb_control_msg (handle, 0x40, 0x01, 0xb0, 0, (char *) buffer, 4, TIMEOUT);
2890 finish_interface (handle);
2902 usb_control_msg (handle, 0x40, 0x01, 0xb0, 0, (char *) buffer, 4, TIMEOUT);
2908 finish_interface (handle);
2917 usb_control_msg (handle, 0x40, 0x01, 0x04, 0x8b, (char *) buffer, 4, TIMEOUT);
2923 finish_interface (handle);
2928 usb_control_msg (handle, 0xc0, 0x01, 0x07, 0, (char *) buffer, 4, TIMEOUT);
2934 finish_interface (handle);
2942 finish_interface (handle);
2946 finish_interface (handle);
2955 usb_dev_handle *handle;
3066 result = prepare_interface (dev, &handle);
3073 usb_control_msg(handle, 0xc0, 0x04, 0xfe11, 0x100, data, 0x02, TIMEOUT);
3080 finish_interface (handle);
3089 finish_interface (handle);
3092 finish_interface (handle);
3100 usb_dev_handle *handle;
3218 result = prepare_interface (dev, &handle);
3229 result = usb_control_msg (handle, USB_ENDPOINT_OUT | USB_TYPE_VENDOR,
3241 result = usb_control_msg (handle, USB_ENDPOINT_IN | USB_TYPE_VENDOR,
3249 finish_interface (handle);
3260 finish_interface (handle);
3274 result = usb_control_msg (handle, USB_ENDPOINT_IN | USB_TYPE_VENDOR,
3282 finish_interface (handle);
3292 finish_interface (handle);
3302 result = usb_control_msg (handle, USB_ENDPOINT_OUT | USB_TYPE_VENDOR,
3310 finish_interface (handle);
3315 result = usb_control_msg (handle, USB_ENDPOINT_IN | USB_TYPE_VENDOR,
3323 finish_interface (handle);
3334 finish_interface (handle);
3343 finish_interface (handle);
3347 finish_interface (handle);
3464 genesys_write_reg (libusb_device_handle * handle, unsigned char reg,
3473 result = libusb_control_transfer (handle,
3482 genesys_read_reg (libusb_device_handle * handle, unsigned char reg,
3487 result = libusb_control_transfer (handle,
3493 result = libusb_control_transfer (handle,
3505 * @param hdl libusb opened handle
3510 check_gl646 (libusb_device_handle * handle,
3604 result = genesys_write_reg (handle, 0x38, 0x15);
3612 result = genesys_read_reg (handle, 0x4e, &val);
3633 * @param hdl libusb opened handle
3638 check_gt6801 (libusb_device_handle * handle,
3707 result = libusb_control_transfer (handle, 0x40, 0x01, 0x2010, 0x3f40, req, 64, TIMEOUT);
3715 result = libusb_control_transfer (handle, 0xc0, 0x01, 0x2011, 0x3f00, req, 64, TIMEOUT);
3736 * @param hdl libusb opened handle
3741 check_gt6816 (libusb_device_handle * handle,
3839 result = libusb_control_transfer (handle, 0x40, 0x04, 0x2012, 0x3f40, req, 64, TIMEOUT);
3847 result = libusb_control_transfer (handle, 0xc0, 0x01, 0x2013, 0x3f00, req, 64, TIMEOUT);
3853 result = libusb_control_transfer (handle, 0xc0, 0x01, 0x2013, 0x3f00, req, 8, TIMEOUT);
3887 * @param hdl libusb opened handle
3892 check_genesys (libusb_device_handle * handle,
3906 return check_gl646 (handle, desc, config0);
4019 result = genesys_write_reg (handle, 0x38, 0x15);
4027 result = genesys_read_reg (handle, 0x38, &val);
4067 lm983x_wb (libusb_device_handle *handle, unsigned char reg, unsigned char val)
4079 result = libusb_bulk_transfer(handle, 0x03, buf, 5, &written, TIMEOUT);
4090 lm983x_rb (libusb_device_handle *handle, unsigned char reg, unsigned char *val)
4101 result = libusb_bulk_transfer(handle, 0x03, buf, 4, &tfx, TIMEOUT);
4108 result = libusb_bulk_transfer(handle, 0x82, val, 1, &tfx, TIMEOUT);
4123 * @param hdl libusb opened handle
4128 check_merlin(libusb_device_handle * handle,
4236 result = lm983x_wb (handle, 0x07, 0x00);
4238 result = lm983x_wb (handle, 0x08, 0x02);
4240 result = lm983x_rb (handle, 0x07, &val);
4242 result = lm983x_rb (handle, 0x08, &val);
4244 result = lm983x_rb (handle, 0x69, &val);