当前位置:网站首页>Common skills in embedded programming

Common skills in embedded programming

2022-06-13 04:45:00 Look at the mountains_ Lau

Suppose a 8 Bit register , Bit addressing is not possible directly , Other bits that are not affected by word assignment . Then give a certain position 0, Set up 1, Common writing of negation .

Let's take the fourth digit as an example (reg Is the octet register ):

Will be the first 4 Location 0:reg &= ~(1<<4);

Will be the first 4 Location 1:reg |= (1<<4);

Will be the first 4 Bit inversion :reg ^= (1<<4);

原网站

版权声明
本文为[Look at the mountains_ Lau]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202280521127800.html