English 中文(简体)
决心是存在一个Serial Port,HCHC++
原标题:Determine is a Serial Port exists, Linux C/C++

我的发展目标是,有两家物理序列港口,位于/dev/ttyS0和/dev/ttyS1。 我也期望界定/dev/ttyS2和/dev/ttyS3。

Using stty -f /dev/ttyS0 and S1 reports the configuration of the two serial ports and reports something menaing "doesn t exist" for S2 and S3.

硬件设计师谈论的是向主机上建的航天港口提供U。 他们是外线和路边的亚银9号连接器,内部没有UV。 US-对空中连接的数量没有保障,我知道设计“many”而不是“many”的足够。

因此,在建立我的港口服务器“ da”时,我需要能够确定哪一种脂肪,哪一种脂肪是“real”,哪些是n t。 是否有任何地方存在。 如果是“无标记”的话(实际上,是常设法院内部真正的U对手)?

是否有比开放()更好的办法,并审查其产出,以确定序列港口的地位? 是否有一份CAP供作准?

感谢!

最佳回答

相对使用的“C-API”是tcsetattr(3)tcgetattr(3)

如果找不到TTYs,你可以研究这个问题:

如何在不开放的情况下找到所有关于短链氯化石蜡的序列装置(ttyS,ttyUSB, )?

问题回答

暂无回答




相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签