Цитата(StasK @ Jun 9 2008, 21:40)

Надо посмотреть инфу о HID драйвере и как он выбирает конечные точки устройства, кроме Control.
Мне надо гнать 3700 двухбайтных точек с CCD в комп. На 64 кбайтах получается 8 посылок/сек, что вполне подходит. Поэтому решили использовать HID, чтобы пользователю было удобно, да и нам не надо думать о работоспособности под разными операционками.
Ну это же кошмар

...
Хид по умолчанию 2 точки
Контрольная и ин точка для посылки репортов, типа интерапт.
можно добавить одну оут точку для приема фичей и оутпут репортов.
номера используемых точек указываются в описании, в структурах которые передаются при описании хид устройства в систему. Так что, сменив точки, надо сменить и описание ХИД устройства.
Но хид в принципе не рассчитан на прокачку данных, вы же должны и стандарт репорта задать, и интервалы опроса репортов. И вообще по умолчанию хид девайс работает от прибора в компутер, но никто не говорит, что в обратную сторону будет также качаться....
Еще одно замечание, мой кристал ат89С5130А при обработке контрольной точки в прерывании работал жуть как медленно, потому что в крситале есть ошибка и прерывание вызывали не только флаги контрольной точки, но и куча дополнительной фигни происходящей на усб... читайте ераты и проверьте, может у вас программа сидит в прерывании 90% времени как у меня было, от того и отчеты редко шлет...
Цитата(StasK @ Jun 9 2008, 22:25)

Надо посмотреть инфу о HID драйвере и как он выбирает конечные точки устройства, кроме Control.
Мне надо гнать 3700 двухбайтных точек с CCD в комп. На 64 кбайтах получается 8 посылок/сек, что вполне подходит. Поэтому решили использовать HID, чтобы пользователю было удобно, да и нам не надо думать о работоспособности под разными операционками.
Согласно этой статье на
http://www.microsoft.com/whdc/archive/hid4.mspx HID общается с Interface а не с Endpoint. Поэтому я не понимаю, почему при изменении номера endpoint на 4 или 5 ничего не работает.
There has been some confusion among Human Interface Device (HID) device implementers in determining whether their HID devices are draft #4 compliant. This confusion stems from a decision by the USB Implementers' Forum to associate the HID descriptor with the Interface, rather than with the Endpoint. The HID descriptor has been repositioned within the Configuration descriptor; the correct order is now Configuration/Interface/HID/Endpoint.
The HID USB driver supplied with Microsoft Windows operating systems looks at the order of the descriptors within the Configuration descriptor to determine whether a device is draft #4 compliant. If the driver sees a descriptor order of Interface/Endpoint/HID, it assumes this is an older device and sends all requests to the Endpoint. If it sees a descriptor order of Interface/HID/Endpoint, it assumes this is a draft #4 compliant device and sends all requests to the Interface.
Moving the HID descriptor has had two troublesome results:
•
Developers have been confused to see bmRequestType with a value of 82h in their bus trace when they were expecting to see 81h.
•
The Configuration descriptor is not parsed correctly under Windows 95 OSR 2.1. Notice that this is only an issue if you are writing or updating HID drivers for OSR 2.1. This is not a problem if you are using HID drivers supplied with Windows 98.
What are the cures?
If bmRequestType is 82h, your HID descriptor is associated with the Endpoint descriptor, rather than with the Interface descriptor. To fix this, relocate the HID descriptor so that it sits after the Interface descriptor and before the Endpoint descriptor. The device firmware that handles the setup packet needs to look for a request type of 81h, rather than 82h. Finally, for devices with multiple interfaces, such as a keyboard with built-in mouse, the wIndex field must reflect the interface for which a Report descriptor is being requested.
The Windows 95 OSR 2.1 USB class driver incorrectly assumes that the Endpoint descriptor immediately follows the Interface descriptor. A solution that works equally well on both Windows 95 and Windows 98 is to clear everything out of the Configuration descriptor returned from the device except Configuration, Interface, and Endpoint descriptors before being passed to USB functions. A sample function that performs this task is available for downloading.
Если правильно трактовать эту статью в терминах усб. То вся разница в том что будет адресатом в посылке через контрольную конечную точку, интерфейс или контрольная точка... Но сетап покеты не имеют смысла при посылках через конечные точки, так что не надо путать мягкое и теплое...