|
bit ( unsigned int uiData, unsigned char ucTemp )
{
bit bFlag;
uiData >>= ucTemp;
uiData &= 0x1;
bFlag = (bit)uiData;
return bFlag;
}
uiData是想取其中一位的整形变量,ucTemp是想取的第几位。返回一个位变量。
例如想取0x1234第0位。
bSever = ( 0x1234, 0 );