在 termios.h 中定义的 c_iflag/c_oflag/c_cflag 位的使用

问题描述 投票:0回答:0

我很好奇为什么在 termios.h 中定义的 c_iflag/c_oflag/c_cflag 位是十进制的,而代码使用这些定义进行按位运算。例如,

#define OCRNL 0000010

那么OCRNL有两个bits set,那如何在bit-wise运算中使用呢?

c linux embedded-linux termios
© www.soinside.com 2019 - 2024. All rights reserved.