Platform dependencies – Comtrol eCos User Manual

Page 799

Advertising
background image

NEC uPD985xx USB Device Driver

point 5, the response is delayed until the bulk transfer has completed. Under typical operating conditions this
does not cause any problems: endpoint 0 traffic usually happens only during initialization, when the target is
connected to the host, while endpoint 5 traffic only happens after initialization. However if transmit serializa-
tion is inappropriate for the system being developed then it can be disabled using the configuration option

CY-

GIMP_DEVS_USB_UPD985XX_SERIALIZE_TRANSMITS

.

Platform Dependencies

On some platforms it is necessary for the low-level USB device driver to perform some additional operations
during start-up. For example it may be necessary to manipulate one of the processor’s GPIO lines before the host
can detect a new USB peripheral and attempt to communicate with it. This avoids problems if the target involves
a significant amount of work prior to device driver initialization, for example a power-on self-test sequence. If the
USB host attempted to contact the target before the USB device driver had been initialized, it would fail to get the
expected responses and conclude that the target was not a functional USB peripheral.

Platform-specific initialization code can be provided via a macro

UPD985XX_USB_PLATFORM_INIT

. Typically this

macro would be defined in the platform HAL’s header file

cyg/hal/plf_io.h

. If the current platform defines

such a macro, the USB device driver will invoke it during the endpoint 0 start-up operation.

695

Advertising