|
#define
Set_Bit(Val, Bitn) (Val|=(1<<Bitn))//位为1
#define Clr_Bit(Val, Bitn) (Val&=~(1<<Bitn))//位为0
#define Com_Bit(Val, Bitn) (Val^=(1<<Bitn))//位取反
#define Get_Bit(Val, Bitn) (Val&(1<<Bitn))//位读取
#define P00 0
#define P01 1
#define P02 2
#define P03 3
#define P04 4
#define P05 5
#define P06 6
#define P07 7
#define Set_P00 Set_Bit(P0,P00)
#define Clr_P00 Clr_Bir(P0,P00)
#define Com_P00 Com_Bit(P0,P00)
#define Get_P00 Get_Bit(P0,P00)
#define Set_P01 Set_Bit(P0,P01)
#define Clr_P01 Clr_Bir(P0,P01)
#define Com_P01 Com_Bit(P0,P01)
#define Get_P01 Get_Bit(P0,P01)
方
法
同
上
.
.
.
.
.
.
|