Searched defs:usb (Results 1 - 12 of 12) sorted by relevance

/system/core/fastboot/
H A Dusbtest.c36 #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 Dprotocol.c50 static int check_response(usb_handle *usb, unsigned int size, char *response) argument
56 r = usb_read(usb, status, 64);
59 usb_close(usb);
66 usb_close(usb);
95 usb_close(usb);
102 usb_close(usb);
109 static int _command_start(usb_handle *usb, const char *cmd, unsigned size, argument
124 if(usb_write(usb, cmd, cmdsize) != cmdsize) {
126 usb_close(usb);
130 return check_response(usb, siz
133 _command_data(usb_handle *usb, const void *data, unsigned size) argument
152 _command_end(usb_handle *usb) argument
162 _command_send(usb_handle *usb, const char *cmd, const void *data, unsigned size, char *response) argument
189 _command_send_no_data(usb_handle *usb, const char *cmd, char *response) argument
197 fb_command(usb_handle *usb, const char *cmd) argument
202 fb_command_response(usb_handle *usb, const char *cmd, char *response) argument
207 fb_download_data(usb_handle *usb, const void *data, unsigned size) argument
229 usb_handle *usb = priv; local
276 fb_download_data_sparse_flush(usb_handle *usb) argument
291 fb_download_data_sparse(usb_handle *usb, struct sparse_file *s) argument
[all...]
H A Dusb_linux.c47 #include <linux/usb/ch9.h>
53 #include "usb.h"
66 * in drivers/usb/core/devio.c.
166 * /dev/bus/usb. Unfortunately, the names of those entries change each
172 * have an Android device at /dev/bus/usb/001/027 so working with bash:
173 * $ ls -l /dev/bus/usb/001/027
174 * crw-rw-r-- 1 root plugdev 189, 26 Apr 9 11:03 /dev/bus/usb/001/027
180 * http://www.linux-usb.org/FAQ.html).
196 snprintf(info.device_path, sizeof(info.device_path), "usb:%s", slash+1);
246 usb_handle *usb local
[all...]
H A Dengine.c114 int fb_getvar(struct usb_handle *usb, char *response, const char *fmt, ...) argument
125 return fb_command_response(usb, cmd, response);
154 int fb_format_supported(usb_handle *usb, const char *partition) argument
161 status = fb_getvar(usb, response, "partition-type:%s", partition);
317 int fb_format(Action *a, usb_handle *usb, int skip_if_not_supported) argument
328 status = fb_getvar(usb, response, "partition-type:%s", partition);
360 status = fb_getvar(usb, response, "partition-size:%s", partition);
382 status = fb_download_data(usb, image.buffer, image.image_size);
387 status = fb_command(usb, cmd);
594 int fb_execute_queue(usb_handle *usb) argument
[all...]
H A Dfastboot.c67 static usb_handle *usb = 0; variable
245 static usb_handle *usb = 0; local
248 if(usb) return usb;
251 usb = usb_open(match_fastboot);
252 if(usb) return usb;
525 static int64_t get_target_sparse_limit(struct usb_handle *usb) argument
529 int status = fb_getvar(usb, response, "max-download-size");
542 static int64_t get_sparse_limit(struct usb_handle *usb, int64_ argument
580 do_flash(usb_handle *usb, const char *pname, const char *fname) argument
[all...]
/system/core/adb/
H A Dusb_linux_client.c22 #include <linux/usb/ch9.h>
23 #include <linux/usb/functionfs.h>
151 struct usb_handle *usb = (struct usb_handle *)x; local
156 adb_mutex_lock(&usb->lock);
157 while (usb->fd != -1)
158 adb_cond_wait(&usb->notify, &usb->lock);
159 adb_mutex_unlock(&usb->lock);
176 usb->fd = fd;
179 register_usb_transport(usb,
318 struct usb_handle *usb = (struct usb_handle *)x; local
[all...]
H A Dusb_windows.c29 /** 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 Dusb_libusb.c332 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 Dusb_linux.c33 #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
564 usb_handle* usb = 0; local
[all...]
H A Dadb.c100 { "usb", TRACE_USB },
219 //Close the associated usb
1188 int usb = 0; local
1192 usb = 1;
1196 // If one of the properties isn't set and we couldn't listen on usb,
1206 } else if (!usb) {
1350 // "transport-usb:" is used for switching transport to the only USB transport
1357 if (!strncmp(service, "transport-usb", strlen("transport-usb"))) {
H A Dadb.h155 ** connects through TCP (for the emulator), while a "usb transport" through
190 /* usb handle or socket fd as needed */
191 usb_handle *usb; member in struct:atransport
289 void init_usb_transport(atransport *t, usb_handle *usb, int state);
304 void unregister_usb_transport(usb_handle *usb);
445 /* usb host/client interface */
480 #define USB_FFS_ADB_PATH "/dev/usb-ffs/adb/"
H A Dtransport.c1061 void register_usb_transport(usb_handle *usb, const char *serial, const char *devpath, unsigned writeable) argument
1064 D("transport: %p init'ing for usb_handle %p (sn='%s')\n", t, usb,
1066 init_usb_transport(t, usb, (writeable ? CS_OFFLINE : CS_NOPERM));
1077 void unregister_usb_transport(usb_handle *usb) argument
1082 if (t->usb == usb && t->connection_state == CS_NOPERM) {

Completed in 103 milliseconds