usblib简单使用


    struct libusb_device_handle *devh = NULL;
 
    libusb_init(NULL);
    if (r < 0) {
        printf("failed to initialise libusb\r\n");
    }
    devh = libusb_open_device_with_vid_pid(NULL, 0x0930, 0x6545);
  
    libusb_get_configuration(devh,&conf);
    printf("find_dpfp_device end libusb_get_configuration =%d \r\n" ,conf);

    
    libusb_control_transfer(devh, 0x40, 0x51, 0x00, 0, NULL, 0, 0);

    libusb_close(devh);
    libusb_exit(NULL);

你可能感兴趣的:(usblib简单使用)