Notes on INF files
Introduction
INF files are in general not a feature in Windows CE, however to configure a USB device to load the appropriate device driver corresponding to a particular VID and PID requires access to a registry editor which (unlike windows) is not always available on a windows CE platform. Using INF files to configure the driver to load properly and initialise some device settings helps users from a windows background to use the drivers without the need for a registry editor or a complete recompile of the driver with each new VID and PID.
On loading the driver parses the INF file (which must be located in the Windows directory) to extract settings such as VID/PID and Latency timer. It then populates the registry with the appropriate values to enable all future removal and insertion of the device to load the FTDI driver.
Please note: INF files are for INSTALLATION ONLY. After a particular device has been installed the inf file becomes redundant and changes to the inf file will not affect the device.
Altering the INF file
The following sections guide you through the steps to alter the FTDIPORT INF file. Please do not alter the name of this file as the driver will not recognise any other file name.
WARNING: YOU MUST NOT CHANGE THE GENERAL FORMAT OF THE INF FILE - DOING THIS COULD CAUSE YOUR INSTALLATION TO HALT THE DEVICE AND THEREFORE REQUIRE A REBOOT. BEFORE PERFORMING THE FOLLOWING PROCEDURE IT IS RECOMMENDED YOU BACK UP ALL ESSENTIAL DATA. If you have any doubt on how to alter the INF file then contact support who can help with this process.
Alternative VID/PID
By default the VCP driver for windows CE (ftdi_ser.dll) will work with devices of VID and PID 0x0403 and 0x6001. Therefore if you do not copy the INF file to the Windows directory the driver will create registry settings for a USB device with VID and PID of 0x0403 and 0x6001.
The INF files provided in this distribution package correspond to a VID and PID of 0x0403 and 0x6001/0x6010. If you have a device with an alternative VID and PID (use USBView on a desktop Windows PC to find out device VID and PID) you will need to edit the INF file to correspond to your device.
The INF file format is a cut down version of the Windows equivalent. On loading (after you type in the driver name in the install driver dialog box) the driver will read the INF file (if it is present in the \Windows\ directory) and use the settings you provide.
The section [FtdiHw] must be altered to correspond to your device VID and PID (you can obtain this using USBView on a desktop PC).
For example for a device with VID 0x1234 and PID 0x4321:
Original (0x0403/0x6001) INF entry
[FtdiHw]
%VID_0403&PID_6001.DeviceDesc%=FtdiPort232,FTDIBUS\COMPORT&VID_0403&PID_6001
New entry with a VID of 0x1234 and PID of 0x4321
[FtdiHw]
%VID_1234&PID_4321.DeviceDesc%=FtdiPort232,FTDIBUS\COMPORT&VID_1234&PID_4321
Multiple VIDs and PIDs
The INF file now supports multiple VID and PIDs - if you want to install 2 devices with different VIDs and PIDs you can have the following entry in the INF file:
[FtdiHw]
%VID_0403&PID_6001.DeviceDesc%=FtdiPort232,FTDIBUS\COMPORT&VID_0403&PID_6001
%VID_0403&PID_6010.DeviceDesc%=FtdiPort232,FTDIBUS\COMPORT&VID_0403&PID_6010
%VID_0403&PID_6011.DeviceDesc%=FtdiPort232,FTDIBUS\COMPORT&VID_0403&PID_6011
%VID_0403&PID_6012.DeviceDesc%=FtdiPort232,FTDIBUS\COMPORT&VID_0403&PID_6012
Additional INF Settings
Additional settings are under the [FtdiPort232.NT.HW.AddReg] section of the INF file. All settings are added to the registry and take effect when the port is opened.
LatencyTimer
This sets the latency on an open (CreateFile) to a device - 1..255
HKR,,"LatencyTimer",0x00010001,25 - this will set the latency timer to 25
InitialIndex
This is the initial index that will be used for this COM device. Currently the driver will assign COM ports 0 to 9 but if you require
the COM port to start at 2 you could have the following setting in the INF file:
HKR,,"InitialIndex",0x00010001,2
ConfigDataFlags
Various settings for control lines
HKR,,"ConfigDataFlags",0x00010001,33
ConfigDataFlags: bit 0: Ignore all set/clear DTR requests
bit 1: Ignore all set/clear RTS requests
bit 2: DTR initial state high (on open device)
bit 3: RTS initial state high (on open device)
bit 4: Ignore set DTR low on close device
bit 5: Ignore set RTS low on close device
So for example if you want all requests to DTR set or clear to be ignored and the initial state of DTR on open to be high use a ConfigDataFlags value of 5 decimal.
ConfigData
Aliasing of baud rate can be used to set a particular baud rate not supported by a legacy application. You in effect replace a standard baud rate for the one you require so the application calls set baud rate for say 9600 but your alias table has set this to 10000 therefore your com port will behave at 10000 baud. For more info please see app note "Configuring FT232BM Baud Rates"
Use the following setting in the INF file to allow for aliasing of baud rates.
HKR,,"ConfigData",1,01,00,3F,3F,10,27,88,13,C4,09,E2,04,71,02,38,41,9c,80,4E,C0,34,00,1A,00,0D,00,06,40,03,80,00,00,d0,80
Persistant unplug/replug.
A feature to allow the COM port to still be available on an unplug/replug or suspend resume has been added. To enable this feature you must set bit 2 of the second byte of the ConfigData flags as follows:
HKR,,"ConfigData",1,01,04,00,00,10,27,88,13,C4,09,E2,04,71,02,38,41,9c,80,4E,C0,34,00,1A,00,0D,00,06,40,03,80,00,00,d0,80
PLEASE NOTE in addition to the above setting you must have unique serial numbers programmed into the devices. This is required to determine which data to attach to which device on an unplug/replug.
Support for CF USB Host
A registry setting may be required to support CF host cards (for example the Ratoc REX-CFU1) the following registry setting should be used in this case
HKR,,"ConfigData",1,01,02,00,00,10,27,88,13,C4,09,E2,04,71,02,38,41,9c,80,4E,C0,34,00,1A,00,0D,00,06,40,03,80,00,00,d0,80
(bit 1 of the second byte of the configuration flag data).
In/Out Transfer Sizes
These 2 settings adjust the bulk transfer size. If you are having problems getting the driver to work (such as unable to read from the port) - try setting the InTransfer size to 64 and working upwards in multiples of 64 to find a suitable value.
HKR,,"InTransferSize",0x00010001,64
HKR,,"OutTransferSize",0x00010001,4096
BulPriority/Ex
HKR,,"BulkPriority",0x00010001,2 - sets the priority of the reading thread of the driver Valid range 0(High priority) to 7(Low priority). Setting this value may cause your hardware to stop functioning therefore take care when setting these values and backup any data you may need. This setting uses the legacy SetThreadPriority function.
HKR,,"BulkPriorityEx",0x00010001,251 - sets the priority of the reading thread of the driver Valid range 0(High priority) to 255(Low priority). Setting this value may cause your hardware to stop functioning therefore take care when setting these values and backup any data you may need. This setting uses the current CeSetThreadPriority function.
Modem Emulation
As per application note AN232B-09 with the exception of using the decimal value instead of hexadecimal value for example HKR,,"EmulationMode",0x00010001,8360 will switch on DTR, DCD, RI and DSR emulation on. This is required to be placed in the \Drivers\USB\FTDI_DEVICE_XXXX\YYYYYYYY where YYYYYYYY is the device serial number or in the \Drivers\USB\FTDI_DEVICE_XXXX if the device has no serial number.
Active Sync Monitoring
Requests have been made to call the CeEventHasOccurred when certain modem lines change within the device.
This requires a separate thread of execution when the device is unopened. The following registry setting is required to turn on this functionality
HKR,,"ActiveSyncSetting",0x00010001,256128
The value cor
没有合适的资源?快使用搜索试试~ 我知道了~
宇泰485驱动.zip
共972个文件
class:118个
png:85个
jpg:78个
需积分: 16 14 下载量 63 浏览量
2019-05-23
22:39:50
上传
评论
收藏 127.88MB ZIP 举报
温馨提示
用于宇泰的USB转485设备的驱动, 1、usb转rs485驱动中还含有安装教程,在安装前可以先看看使用说明再安装。 2、将USB转换线插入电脑的USB接口中,系统会提示检测到新设备并出现新硬件添加向导 3、选择从列表或指定位置安装,手动安装,找到刚才驱动的解压目录 4、让WINDOWS自动搜索更新驱动即可。
资源推荐
资源详情
资源评论
收起资源包目录
宇泰485驱动.zip (972个子文件)
USBSER~1.000 486B
USBSER~1.000 484B
00USBSER.001 34KB
00USBSER.001 29KB
resources.ap_ 114KB
resources.ap_ 27KB
resources.ap_ 24KB
resources.ap_ 24KB
resources.ap_ 23KB
PL2303HXDModemStatus.apk 406KB
PL2303HXDModemStatus.apk 406KB
PL2303HXDGPIO.apk 200KB
PL2303HXDGPIO.apk 200KB
PLUartMultiSimpleTest.apk 199KB
PLUartMultiSimpleTest.apk 199KB
PL2303HXDSimpleTest.apk 180KB
PL2303HXDSimpleTest.apk 179KB
PL2303HXDSimpleTest.apk 179KB
demo.aps 37KB
PCL32C.BAS 2KB
QBPROG.BAS 2KB
WinIo.bas 1KB
PCLINK32.bas 340B
layout.bin 434B
layout.bin 434B
layout.bin 434B
layout.bin 434B
SETUP.bmp 38KB
SETUP.bmp 38KB
SETUP.bmp 38KB
ftdi_sio.c 81KB
ftdi_sio.c 77KB
ftdi_sio.c 77KB
pl2303.c 21KB
pl2303.c 20KB
pl2303.c 20KB
Util32c.c 10KB
TCPROG.C 609B
data1.cab 587KB
data1.cab 587KB
data1.cab 552KB
data1.cab 552KB
data2.cab 46KB
data2.cab 46KB
data2.cab 46KB
data2.cab 46KB
USBSER.x86.CAB 37KB
PL2303_WinCE50_ARM_v1009.CAB 35KB
USBSER.ARM.CAB 33KB
PL2303_WinCE50_x86_v1009.CAB 30KB
jarlist.cache 120B
ftdibus.cat 18KB
ftdiport.cat 17KB
ftdibus.cat 12KB
ftdiport.cat 11KB
ftdiport.cat 10KB
ftdibus.cat 10KB
ftsermou.cat 9KB
NET8511.CAT 7KB
irstusb.cat 358B
stirusb.cat 358B
stirusb.cat 358B
stirusb.cat 358B
stirusb.cat 358B
stirusb.cat 358B
irstusb.cat 358B
irstusb.cat 358B
stirusb.cat 358B
stirusb.cat 358B
stirusb.cat 358B
stirusb.cat 358B
stirusb.cat 358B
irstusb.cat 358B
stirusb.cat 358B
stirusb.cat 358B
PL2303GPIOActivity.class 24KB
MainActivity.class 19KB
PL2303HXDSimpleTest.class 14KB
PL2303HXDSimpleTest.class 14KB
PL2303HXDModemStatusActivity.class 11KB
MainActivity$MyOnItemSelectedListener.class 5KB
PL2303HXDSimpleTest$2.class 5KB
PL2303HXDSimpleTest$2.class 5KB
PL2303HXDSimpleTest$MyOnItemSelectedListener.class 5KB
PL2303HXDSimpleTest$MyOnItemSelectedListener.class 5KB
MainActivity$1.class 3KB
PL2303HXDSimpleTest$1.class 3KB
PL2303HXDSimpleTest$1.class 3KB
R$id.class 2KB
MainActivity$3.class 2KB
MainActivity$4.class 2KB
MainActivity$2.class 2KB
PL2303HXDSimpleTest$6.class 2KB
PL2303HXDSimpleTest$6.class 2KB
MainActivity$4$1.class 2KB
MainActivity$3$1.class 2KB
MainActivity$2$1.class 2KB
MainActivity$DeviceOrderIndex.class 1KB
UARTSettingInfo.class 1KB
R$id.class 1KB
共 972 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
资源评论
橡榆羡
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功