i use the usb g_serial module：
modprobe g_serial use_acm=0
in the /dev. i can saw the ttyGS0。
connect pc ，i can saw the Device endpoint use the libusb：
i can use ：
int usb_fd = open("/dev/ttyGS0", O_RDWR);
and use the usb by read and writ functoin.
in the pc ,i use the libusb-win32-bin-126.96.36.199 .
in a qt project, i read and write the usb by:
usb_bulk_write(dev, EP_OUT, tmp, sizeof(tmp), 5000);
usb_bulk_read(dev, EP_IN, tmp, sizeof(tmp), 5000);
1.how to use the timeout in arm board?
i use the select to implement this function.
is there have other way to implement this function?
2.i want to use the Device endpoint 00h.
there is only one ttyGS0.how can i identification the data from the pc with different endpoint address?
and hwo can i send and receive data by endpoint 00h?
in the /sys/bus/usb/devices/usb1:
int the /sys/bus/usb/devices/usb1/1-0:1.0:
if i can use these files to send and receive data by different endpoint? how？
thanks for you help!!