Lines Matching refs:ep0
164 static void handle_ep0(int ep0, bool *ready) in handle_ep0() argument
170 pfds[0].fd = ep0; in handle_ep0()
176 ret = read(ep0, &event, sizeof(event)); in handle_ep0()
185 write(ep0, NULL, 0); in handle_ep0()
187 read(ep0, NULL, 0); in handle_ep0()
209 int ep0; in main() local
235 ep0 = open(ep_path, O_RDWR); in main()
236 if (ep0 < 0) { in main()
240 if (write(ep0, &descriptors, sizeof(descriptors)) < 0) { in main()
244 if (write(ep0, &strings, sizeof(strings)) < 0) { in main()
281 FD_SET(ep0, &rfds); in main()
284 ret = select(((ep0 > evfd) ? ep0 : evfd)+1, in main()
293 if (FD_ISSET(ep0, &rfds)) in main()
294 handle_ep0(ep0, &ready); in main()
365 close(ep0); in main()