Proof-of-concept driver added
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
struct DEVICE
|
||||
{
|
||||
|
||||
void* driver;
|
||||
};
|
||||
|
||||
array_t* device_array;
|
||||
|
@@ -89,16 +89,16 @@ void usb_init()
|
||||
struct libusb_device_descriptor desc;
|
||||
libusb_get_device_descriptor(current, &desc);
|
||||
|
||||
printf("Found usb device %04x:%04x\n", desc.idVendor, desc.idProduct);
|
||||
array_t* array = device_get_array();
|
||||
array_add(array, 0);
|
||||
// printf("Found usb device %04x:%04x\n", desc.idVendor, desc.idProduct);
|
||||
// array_t* array = device_get_array();
|
||||
// array_add(array, 0);
|
||||
|
||||
libusb_device_handle* handle;
|
||||
libusb_open(current, &handle);
|
||||
char buf[4096] = {0};
|
||||
libusb_get_string_descriptor_ascii(handle, 1, buf, 4096);
|
||||
printf("Device desc (1): %s\n", buf);
|
||||
libusb_get_string_descriptor_ascii(handle, 2, buf, 4096);
|
||||
printf("Device desc (2): %s\n", buf);
|
||||
// libusb_device_handle* handle;
|
||||
// libusb_open(current, &handle);
|
||||
// char buf[4096] = {0};
|
||||
// libusb_get_string_descriptor_ascii(handle, 1, buf, 4096);
|
||||
// printf("Device desc (1): %s\n", buf);
|
||||
// libusb_get_string_descriptor_ascii(handle, 2, buf, 4096);
|
||||
// printf("Device desc (2): %s\n", buf);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user