struct {
word PB0 :1; /* Port B Bit 0 */
word PB1 :1; /* Port B Bit 1 */
word PB2 :1; /* Port B Bit 2 */
word PB3 :1; /* Port B Bit 3 */
word PB4 :1; /* Port B Bit 4 */
word PB5 :1; /* Port B Bit 5 */
word PB6 :1; /* Port B Bit 6 */
word PB7 :1; /* Port B Bit 7 */
word PA0 :1; /* Port A Bit 0 */
word PA1 :1; /* Port A Bit 1 */
word PA2 :1; /* Port A Bit 2 */
word PA3 :1; /* Port A Bit 3 */
word PA4 :1; /* Port A Bit 4 */
word PA5 :1; /* Port A Bit 5 */
word PA6 :1; /* Port A Bit 6 */
word PA7 :1; /* Port A Bit 7 */
} Bits;
struct {
word grpPB :8;
word grpPA :8;
} MergedBits;
} PORTABSTR;
位域,这样可以按位操作,有效利用存储空间。
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |