(1)结构体位字段的使用,以后寄存器的使用会很方便
struct tor_reg{
int SN:4; //4 bits for SN
int :4; //4 bits unused
bool good_in:1; //input i/o
bool good_tor:1; //image
};
struct tor_reg tr={14,1,0}; //init register
if(tr.good_in) {} //test good_in
不需要对寄存器写麻烦的位操作…
(2)
学习c++
最新推荐文章于 2023-05-24 21:58:39 发布