请问大家Uint16 Intx1:1 冒号和冒号后的1是什么意思啊?

本人刚刚开始接触DSP啊,请问个白痴的问题。在寄存器定义的头文件中总是可以看到如下代码:Uint16 Intx1:1;请问冒号和冒号后面的1表示什么意思啊?谢谢大家了。

冒号后面的数字代表的是长度。看下TI DSP的头文件,你会发现在结构体和联合体中,基本都是这种形式的。比如:struct GPADIR_BITS { // bits description Uint16 GPIOA0:1; // 0 Uint16 GPIOA1:1; // 1 Uint16 GPIOA2:1; // 2 Uint16 GPIOA3:1; // 3 Uint16 GPIOA4:1; // 4 Uint16 GPIOA5:1; // 5 Uint16 GPIOA6:1; // 6 Uint16 GPIOA7:1; // 7 Uint16 GPIOA8:1; // 8 Uint16 GPIOA9:1; // 9 Uint16 GPIOA10:1; // 10 Uint16 GPIOA11:1; // 11 Uint16 GPIOA12:1; // 12 Uint16 GPIOA13:1; // 13 Uint16 GPIOA14:1; // 14 Uint16 GPIOA15:1; // 15 };冒号后边的1代表是一个bit的长度。 Uint16 xxx:3;则代表三个bit的长度从0到2.
温馨提示:答案为网友推荐,仅供参考