Lines Matching defs:usb_handle
57 struct usb_handle
64 int (*write)(usb_handle *h, const void *data, int len);
65 int (*read)(usb_handle *h, void *data, int len);
66 void (*kick)(usb_handle *h);
67 void (*close)(usb_handle *h);
244 struct usb_handle *usb = (struct usb_handle *)x;
283 static int usb_adb_write(usb_handle *h, const void *data, int len)
302 static int usb_adb_read(usb_handle *h, void *data, int len)
327 static void usb_adb_kick(usb_handle *h) {
338 static void usb_adb_close(usb_handle *h) {
350 usb_handle* h = reinterpret_cast<usb_handle*>(calloc(1, sizeof(usb_handle)));
351 if (h == nullptr) fatal("couldn't allocate usb_handle");
383 static bool init_functionfs(struct usb_handle *h)
465 struct usb_handle *usb = (struct usb_handle *)x;
494 static int usb_ffs_write(usb_handle* h, const void* data, int len) {
513 static int usb_ffs_read(usb_handle* h, void* data, int len) {
532 static void usb_ffs_kick(usb_handle *h)
555 static void usb_ffs_close(usb_handle *h) {
570 usb_handle* h = reinterpret_cast<usb_handle*>(calloc(1, sizeof(usb_handle)));
571 if (h == nullptr) fatal("couldn't allocate usb_handle");
602 int usb_write(usb_handle *h, const void *data, int len)
607 int usb_read(usb_handle *h, void *data, int len)
611 int usb_close(usb_handle *h)
617 void usb_kick(usb_handle *h)