
© 2010 Cypress Semiconductor
Cypress CyUsb.sys
Programmer's Reference

Cypress CyUsb.sys Programmer's Reference2
© 2010 Cypress Semiconductor
Table of Contents
Foreword 0
Part I Driver Overview
4
Part II Features Not Supported
5
Part III Modifying CyUSB.INF
5
Part IV Matching Devices to the Driver
11
................................................................................................................................... 111 Windows 2000
................................................................................................................................... 152 Windows XP
................................................................................................................................... 203 Windows Vista and 7
Part V Reinstalling the Driver
25
Part VI The IOCTL Interface
26
................................................................................................................................... 261 Getting a Handle to the Driver
................................................................................................................................... 282 IOCTL_ADAPT_ABORT_PIPE
................................................................................................................................... 293 IOCTL_ADAPT_CYCLE_PORT
................................................................................................................................... 304 IOCTL_ADAPT_GET_ADDRESS
................................................................................................................................... 305 IOCTL_ADAPT_GET_ALT_INTERFACE_SETTING
................................................................................................................................... 316 IOCTL_ADAPT_GET_CURRENT_FRAME
................................................................................................................................... 327 IOCTL_ADAPT_GET_DEVICE_NAME
................................................................................................................................... 338 IOCTL_ADAPT_GET_DEVICE_POWER_STATE
................................................................................................................................... 339 IOCTL_ADAPT_GET_DEVICE_SPEED
................................................................................................................................... 3410 IOCTL_ADAPT_GET_DRIVER_VERSION
................................................................................................................................... 3511 IOCTL_ADAPT_GET_FRIENDLY_NAME
................................................................................................................................... 3612 IOCTL_ADAPT_GET_NUMBER_ENDPOINTS
................................................................................................................................... 3713 IOCTL_ADAPT_GET_TRANSFER_SIZE
................................................................................................................................... 3714 IOCTL_ADAPT_GET_USBDI_VERSION
................................................................................................................................... 3815 IOCTL_ADAPT_RESET_PARENT_PORT
................................................................................................................................... 3916 IOCTL_ADAPT_RESET_PIPE
................................................................................................................................... 4017 IOCTL_ADAPT_SELECT_INTERFACE
................................................................................................................................... 4018 IOCTL_ADAPT_SEND_EP0_CONTROL_TRANSFER
................................................................................................................................... 4219 IOCTL_ADAPT_SEND_NON_EP0_TRANSFER
................................................................................................................................... 4320 IOCTL_ADAPT_SEND_NON_EP0_DIRECT
................................................................................................................................... 4821 IOCTL_ADAPT_SET_DEVICE_POWER_STATE
................................................................................................................................... 4822 IOCTL_ADAPT_SET_TRANSFER_SIZE

3Contents
3
© 2010 Cypress Semiconductor
Part VII CYIOCTL.H
49
................................................................................................................................... 511 ISO_ADV_PARAMS
................................................................................................................................... 532 SINGLE_TRANSFER
................................................................................................................................... 563 SETUP_PACKET
................................................................................................................................... 574 SET_TRANSFER_SIZE_INFO
Index 58

Cypress CyUsb.sys Programmer's Reference4
© 2010 Cypress Semiconductor
1 Driver Overview
Driver Overview
Top Next
Driver Overview
Top Next
Driver Overview
Top Next
The CYUSB.SYS driver is licensed for distribution ONLY with Cypress USB products and
products that employ Cypress USB chips.
CYUSB.SYS is a USB device driver for 32 bit Windows 2000, 32/64 bit Windows XP, 32/64 bit
Windows Vista and 32/64bit Windows 7(Vista versions of cyusb.sys have been tested and
compatible with Windows 7) , that is capable of communicating with any USB 2.0 compliant
device. The driver is general-purpose, understanding primitive USB commands, but not
implementing higher-level, USB device-class specific commands. For this reason, the driver is not
capable, for instance, of interfacing a USB mass storage class device to the Windows file
system.
However, the driver would be ideal for communicating with a vendor-specific device from a custom
USB application. Or, it might be used to send low-level USB requests to any USB device for
experimental or diagnostic applications.
In order to use the driver to communicate with a device, Windows must match the device to the
driver.
The class library, CyAPI.lib and Cyusb.dll, provides a high-level programming interface to the
driver. This help file documents the low-level, more cumbersome and explicit, programming
interface.
Features
Windows Driver Model (WDM) compliant
WHQL Certified (not signed)
Compatible with any USB 2.0 compliant
device
Supports Windows PnP and Power
Management level S4
Supports USB Remote Wake-up
Supports Control, Bulk, Interrupt and
Isochronous endpoints
Supports multiple USB devices connected at
once
Supports customizable driver GUID without
re-building the driver
Supports high bandwidth data transfers
passing multiple packets per uframe
Supports automatic play-back of control
transfer scripts at device startup

Driver Overview 5
© 2010 Cypress Semiconductor
2 Features Not Supported
Features Not Supported
Top Previous Next
Features Not Supported
Top Previous Next
The Following features are not supported by CyUSB.sys driver due to the lack of interface URBs
to the Bus driver.
1.
SET ADDRESS Feature
The SET ADDRESS Request cannot be implemented through control endpoint.
2.
SYNC FRAME
The SYNC FRAME Request cannot be implemented through Control Endpoint.
3 Modifying CyUSB.INF
Modifying CyUSB.INF
Top Previous Next
Modifying CyUSB.INF
Top Previous Next
Modifying CyUSB.INF
Previous Top Next
The CYUSB.INF file can be modified to accomplish several different objectives. These are:
1. Add a device's identifiers to the driver
2. Replace Cypress strings that are displayed during driver installation
3. Implement a custom GUID for the driver
4. Execute a saved script of commands at driver load time
NOTE: Below steps cover 32/64 bit INF section update, Ntx86 refer to the 32bit system and
Ntamd64 refer to 64 bit system. Same INF file will be used to install driver on 32/64 bit Operating
System.
Add a device's identifiers to the driver
To make the driver match to a specific device, the device's vendor ID and product ID need to be
added to the .inf file.