所需开发工具:
- Keil uVision3
- EZ-USB_devtools_version_261700
C:/Cypress/USB/Examples/有很多源代码,一般只需要修改部分代码就可以了.
Edit the program.c file
TD_Init(void)
DR_VendorCmnd(void)
Edit the dscr.a51 file:
DeviceDscr:
db DSCR_DEVICE_LEN ;; Descriptor length
db DSCR_DEVICE ;; Decriptor type
dw 0002H ;; Specification Version (BCD)
db 00H ;; Device class
db 00H ;; Device sub-class
db 00H ;; Device sub-sub-class
db 64 ;; Maximum packet size
dw 8808H ;; Vendor ID
dw 0210H ;; Product ID (Sample Device)
dw 0000H ;; Product version ID
db 1 ;; Manufacturer string index
db 2 ;; Product string index
db 0 ;; Serial number string index
db 1 ;; Number of configurations
build the project make the hex file
use follow command make the iic file for FX2 eeprom download
c:/cypress/usb/bin/hex2bix -i -f 0xC2 -v 0x0888 -p 0x1002 -o vend_ax.iic vend_ax.hex
0x0888 is Vendor ID
0x1002 is Product ID
Edit driver.inf file like this
[Cypress]
;%VID_VVVV&PID_PPPP.DeviceDesc%=CyUsb, USB/VID_VVVV&PID_PPPP
%VID_04B4&PID_8613.DeviceDesc%=CyUsb, USB/VID_04B4&PID_8613
%VID_0888&PID_1002.DeviceDesc%=CyUsb, USB/VID_0888&PID_1002
[Strings]
CYPRESS="Cypress"
MfgName="Cypress"
CYUSB_INSTALL="Cypress Generic USB Driver Installation Disk"
;VID_VVVV&PID_PPPP.DeviceDesc="Cypress Generic USB Device"
VID_04B4&PID_8613.DeviceDesc="Cypress Generic USB Device"
VID_0888&PID_1002.DeviceDesc="HJ USB Device"