Lines Matching full:ep0
182 static void handle_ep0(int ep0, bool *ready) in handle_ep0() argument
188 pfds[0].fd = ep0; in handle_ep0()
194 ret = read(ep0, &event, sizeof(event)); in handle_ep0()
196 perror("unable to read event from ep0"); in handle_ep0()
203 write(ep0, NULL, 0); in handle_ep0()
205 read(ep0, NULL, 0); in handle_ep0()
227 int ep0; in main() local
252 sprintf(ep_path, "%s/ep0", argv[1]); in main()
253 ep0 = open(ep_path, O_RDWR); in main()
254 if (ep0 < 0) { in main()
255 perror("unable to open ep0"); in main()
258 if (write(ep0, &descriptors, sizeof(descriptors)) < 0) { in main()
262 if (write(ep0, &strings, sizeof(strings)) < 0) { in main()
299 FD_SET(ep0, &rfds); in main()
302 ret = select(((ep0 > evfd) ? ep0 : evfd)+1, in main()
311 if (FD_ISSET(ep0, &rfds)) in main()
312 handle_ep0(ep0, &ready); in main()
383 close(ep0); in main()