/system/core/fastboot/ |
H A D | protocol.c | 43 static int check_response(usb_handle *usb, unsigned size, argument 50 r = usb_read(usb, status, 64); 53 usb_close(usb); 60 usb_close(usb); 89 usb_close(usb); 96 usb_close(usb); 103 static int _command_send(usb_handle *usb, const char *cmd, argument 119 if(usb_write(usb, cmd, cmdsize) != cmdsize) { 121 usb_close(usb); 126 return check_response(usb, siz 157 fb_command(usb_handle *usb, const char *cmd) argument 162 fb_command_response(usb_handle *usb, const char *cmd, char *response) argument 167 fb_download_data(usb_handle *usb, const void *data, unsigned size) argument [all...] |
H A D | fastboot.h | 32 #include "usb.h" 35 int fb_command(usb_handle *usb, const char *cmd); 36 int fb_command_response(usb_handle *usb, const char *cmd, char *response); 37 int fb_download_data(usb_handle *usb, const void *data, unsigned size); 55 int fb_execute_queue(usb_handle *usb);
|
H A D | usbtest.c | 36 #include "usb.h" 89 int test_null(usb_handle *usb) argument 98 if(usb_write(usb, buf, arg_size) != arg_size) { 108 int test_zero(usb_handle *usb) argument 116 if(usb_read(usb, buf, arg_size) != arg_size) { 130 int (*test)(usb_handle *usb); 180 usb_handle *usb; local 193 usb = usb_open(tests[i].match); 195 if(usb == 0) { 200 if(tests[i].test(usb)) { [all...] |
H A D | usb_linux.c | 46 #include <linux/usb/ch9.h> 52 #include "usb.h" 65 * in drivers/usb/core/devio.c. 207 usb_handle *usb = 0; local 220 while((de = readdir(busdir)) && (usb == 0)) { 228 while((de = readdir(devdir)) && (usb == 0)) { 248 usb = calloc(1, sizeof(usb_handle)); 249 strcpy(usb->fname, devname); 250 usb->ep_in = in; 251 usb [all...] |
H A D | engine.c | 270 int fb_format(Action *a, usb_handle *usb, int skip_if_not_supported) argument 283 status = fb_command_response(usb, cmd, response); 317 status = fb_command_response(usb, cmd, response); 339 status = fb_download_data(usb, image.buffer, image.image_size); 344 status = fb_command(usb, cmd); 538 int fb_execute_queue(usb_handle *usb) argument 556 status = fb_download_data(usb, a->data, a->size); 560 status = fb_command(usb, a->cmd); 564 status = fb_command_response(usb, a->cmd, resp); 570 status = fb_format(a, usb, (in [all...] |
H A D | fastboot.c | 55 static usb_handle *usb = 0; variable 195 static usb_handle *usb = 0; local 198 if(usb) return usb; 201 usb = usb_open(match_fastboot); 202 if(usb) return usb; 740 usb = open_device(); 742 status = fb_execute_queue(usb);
|
H A D | Android.mk | 48 LOCAL_C_INCLUDES += development/host/windows/usb/api
|
H A D | usb_osx.c | 33 #include <IOKit/usb/IOUSBLib.h> 37 #include "usb.h" 52 /** An open usb device */
|
/system/core/adb/ |
H A D | usb_linux.c | 33 #include <linux/usb/ch9.h> 45 /* usb scan debugging is waaaay too verbose */ 87 usb_handle *usb; local 90 for(usb = handle_list.next; usb != &handle_list; usb = usb->next){ 91 if(!strcmp(usb->fname, dev_name)) { 93 usb->mark = 1; 104 usb_handle *usb; local 539 usb_handle* usb = 0; local [all...] |
H A D | transport_usb.c | 55 if(usb_read(t->usb, &p->msg, sizeof(amessage))){ 56 D("remote usb: read terminated (message)\n"); 63 D("remote usb: check_header failed\n"); 68 if(usb_read(t->usb, p->data, p->msg.data_length)){ 69 D("remote usb: terminated (data)\n"); 75 D("remote usb: check_data failed\n"); 88 if(usb_write(t->usb, &p->msg, sizeof(amessage))) { 89 D("remote usb: 1 - write terminated\n"); 93 if(usb_write(t->usb, &p->data, size)) { 94 D("remote usb [all...] |
H A D | usb_linux_client.c | 47 struct usb_handle *usb = (struct usb_handle *)x; local 52 adb_mutex_lock(&usb->lock); 53 while (usb->fd != -1) 54 adb_cond_wait(&usb->notify, &usb->lock); 55 adb_mutex_unlock(&usb->lock); 72 usb->fd = fd; 75 register_usb_transport(usb, 0, 1); 137 fatal_errno("cannot create usb thread");
|
H A D | usb_libusb.c | 332 struct usb_handle *usb= NULL; local 334 usb = calloc(1, sizeof(struct usb_handle)); 335 memcpy(usb, uh, sizeof(struct usb_handle)); 336 strcpy(usb->serial, uh->serial); 338 adb_cond_init(&usb->notify, 0); 339 adb_mutex_init(&usb->lock, 0); 343 usb->next = &handle_list; 344 usb->prev = handle_list.prev; 345 usb->prev->next = usb; 358 struct usb_handle *usb= NULL; local 562 struct usb_handle *usb= NULL; local [all...] |
H A D | usb_windows.c | 29 /** Structure usb_handle describes our connection to the usb device via 34 /// Previous entry in the list of opened usb handles 37 /// Next entry in the list of opened usb handles 59 /// List of opened usb handles 65 /// Locker for the list of opened usb handles 68 /// Checks if there is opened usb handle in handle_list for this device. 71 /// Checks if there is opened usb handle in handle_list for this device. 75 /// Registers opened usb handle (adds it to handle_list). 82 /// registers usb transport for them. 85 /// Entry point for thread that polls (every second) for new usb interface 117 usb_handle* usb; local [all...] |
H A D | Android.mk | 12 # Default to a virtual (sockets) usb interface 49 LOCAL_C_INCLUDES += development/host/windows/usb/api/
|
H A D | adb.h | 154 ** connects through TCP (for the emulator), while a "usb transport" through 186 /* usb handle or socket fd as needed */ 187 usb_handle *usb; member in struct:atransport 277 void init_usb_transport(atransport *t, usb_handle *usb, int state); 292 void unregister_usb_transport(usb_handle *usb); 432 /* usb host/client interface */
|
H A D | transport.c | 959 void register_usb_transport(usb_handle *usb, const char *serial, unsigned writeable) argument 962 D("transport: %p init'ing for usb_handle %p (sn='%s')\n", t, usb, 964 init_usb_transport(t, usb, (writeable ? CS_OFFLINE : CS_NOPERM)); 972 void unregister_usb_transport(usb_handle *usb) argument 977 if (t->usb == usb && t->connection_state == CS_NOPERM) {
|
H A D | usb_osx.c | 21 #include <IOKit/usb/IOUSBLib.h>
|
/system/core/include/usbhost/ |
H A D | usbhost.h | 28 #include <linux/usb/ch9.h>
|
/system/core/rootdir/ |
H A D | Android.mk | 53 # init.usb.rc is handled by build/target/product/core.rc
|