См сайт автора.
Самая последняя версия всегда находится в составе reference-проекта PowerSwitch.
Изменения в текущей версии:
Цитата
* Release 2006-03-14
- Added IAR compiler compatibility to USB driver (not the PowerSwitch project).
Thanks to Oleg Semyonov for contributing this port!
- Major Bugfixes in the low level parts of the USB driver. See the driver's
Changelog for details.
- Added IAR compiler compatibility to USB driver (not the PowerSwitch project).
Thanks to Oleg Semyonov for contributing this port!
- Major Bugfixes in the low level parts of the USB driver. See the driver's
Changelog for details.
Цитата
Changelog:
- Give a compiler warning when compiling with debugging turned on.
- Added Oleg Semyonov's changes for IAR-cc compatibility.
- Added new (optional) functions usbDeviceConnect() and usbDeviceDisconnect()
(also thanks to Oleg!).
- Rearranged tests in usbPoll() to save a couple of instructions in the most
likely case that no actions are pending.
- We need a delay between the SET ADDRESS request until the new address
becomes active. This delay was handled in usbPoll() until now. Since the
spec says that the delay must not exceed 2ms, previous versions required
aggressive polling during the enumeration phase. We have now moved the
handling of the delay into the interrupt routine.
- We must not reply with NAK to a SETUP transaction. We can only achieve this
by making sure that the rx buffer is empty when SETUP tokens are expected.
We therefore don't pass zero sized data packets from the status phase of
a transfer to usbPoll(). This change MAY cause troubles if you rely on
receiving a less than 8 bytes long packet in usbFunctionWrite() to
identify the end of a transfer. usbFunctionWrite() will NEVER be called
with a zero length.
- Give a compiler warning when compiling with debugging turned on.
- Added Oleg Semyonov's changes for IAR-cc compatibility.
- Added new (optional) functions usbDeviceConnect() and usbDeviceDisconnect()
(also thanks to Oleg!).
- Rearranged tests in usbPoll() to save a couple of instructions in the most
likely case that no actions are pending.
- We need a delay between the SET ADDRESS request until the new address
becomes active. This delay was handled in usbPoll() until now. Since the
spec says that the delay must not exceed 2ms, previous versions required
aggressive polling during the enumeration phase. We have now moved the
handling of the delay into the interrupt routine.
- We must not reply with NAK to a SETUP transaction. We can only achieve this
by making sure that the rx buffer is empty when SETUP tokens are expected.
We therefore don't pass zero sized data packets from the status phase of
a transfer to usbPoll(). This change MAY cause troubles if you rely on
receiving a less than 8 bytes long packet in usbFunctionWrite() to
identify the end of a transfer. usbFunctionWrite() will NEVER be called
with a zero length.
Ошибки проявлялись на фазе начального коннекта при ряде специфических условий и при интенсивном обмене с хостом (знаю в деталях, ибо сам руку приложил к их обнаружению и идентификации). Сейчас все работает отлично. Размер кода не увеличился. Рекомендую обновить версию.