#define BIT_JUDGE(Val,Bit) ((Val>>Bit)&0x01) /* 位判断 /
#define BIT_SET(Val,Bit) (Val |= (1<<Bit)) / 位置1 /
#define BIT_CLEAR(Val,Bit) (Val &= ~(1<<Bit)) / 位置0 /
#define BIT_INVERT(Val,Bit) (Val ^= (1<<Bit)) / 位取反 */
#define NUM_TO_CHAR(Num) (Num+‘0’)
#define CHAR_TO_NUM(Char) (Char-‘0’)
常见的位操作进行封装
最新推荐文章于 2021-09-13 16:26:03 发布