How do you programmatically configure the Serial FIFO Receive and Transmit Buffers in Windows?

自古美人都是妖i 提交于 2019-12-11 23:46:27

问题


From Device Manager in Windows it is possible to configure the Receive Buffer and Transmit FIFO Buffer sizes for a serial port from Advanced Settings for a COM port:

I would like to configure the values for the TX and RX FIFO buffers for COM ports programmatically. Ideally a method to do it in LabVIEW or even via .NET / command line as both are easy to interface with from LabVIEW.

Edit: Just to clarify this is in regards to the 16550 compatible UART FIFO buffers and not software buffers like the VISA I/O Buffer, etc.


回答1:


A few options are available that are not as ideal for this case but useful to note:

The CodeProject post by Vladimir titled "Serial Ports. Enumeration and FIFO control" has an approach that uses the Microsoft Driver Development Kit (DDK) which is now the Windows Driver Kit (WDK) in Visual C++.

The forum "How to set Serial port Fifo buffers without reboot" describes that the values can be changed in the registry (manually or programmatically I suppose) and then the serial port interface restarted using the DEVCON command-line tool. I am not sure how reliable that approach and documentation is hard to find.



来源:https://stackoverflow.com/questions/16229872/how-do-you-programmatically-configure-the-serial-fifo-receive-and-transmit-buffe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!