问题描述
我想通过计算机中的真正串行端口将二进制数据从我的 PC 传递到我的微控制器.这个时候,我正在考虑使用 INB 和 OUTB 函数,这样我就不必忍受 linux tty 字符覆盖.
I want to pass binary data from my PC to my micro-controller through the real serial port in my computer. At this time, I'm thinking of using INB and OUTB functions so I don't have to put up with linux tty character overrides.
问题是,如何配置串口的波特率,如果我使用它的地址和INB和OUTB功能?例如,如果我想写入 COM1 (0x3F8),我将如何确定正在写入的波特率数据?
Question is, how do I configure the baud rate of the serial port, if I use its address with the INB and OUTB functions? For example, if I want to write to COM1 (0x3F8), how will I be able to determine the baud rate data is being written at?
stty 是否仍然有某种后台控制与 INB 和 OUTB 或 seterial 或什么?
Does stty still have some sort of background control with INB and OUTB or setserial or what?
推荐答案
这是一个糟糕的、不好的、非常糟糕的主意,而且行不通.如果您尝试更改现有的串行驱动程序下的端口配置,它们将变得非常混乱.
This is a terrible, no good, very bad idea, and it won't work. The existing serial drivers will get very confused if you try to change the port configuration from under them.
这篇关于inb 和 outb 命令的波特率 - linux的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!