Lines Matching full:ep0
176 static void handle_ep0(int ep0, bool *ready) in handle_ep0() argument
181 ret = read(ep0, &event, sizeof(event)); in handle_ep0()
183 perror("unable to read event from ep0"); in handle_ep0()
190 write(ep0, NULL, 0); in handle_ep0()
192 read(ep0, NULL, 0); in handle_ep0()
240 int ep0, ep1; in main() local
263 sprintf(ep_path, "%s/ep0", argv[1]); in main()
264 ep0 = open(ep_path, O_RDWR); in main()
265 if (ep0 < 0) { in main()
266 perror("unable to open ep0"); in main()
269 if (write(ep0, &descriptors, sizeof(descriptors)) < 0) { in main()
273 if (write(ep0, &strings, sizeof(strings)) < 0) { in main()
304 FD_SET(ep0, &rfds); in main()
307 ret = select(((ep0 > evfd) ? ep0 : evfd)+1, in main()
316 if (FD_ISSET(ep0, &rfds)) in main()
317 handle_ep0(ep0, &ready); in main()
377 close(ep0); in main()