2020-01-30 14:12发布
faduo2012 发表于 2013-2-21 18:22 unsigned char ChanByte(unsigned char DatBye) { unsigned char i, j = 0, k = 0, HightBit, LowBit;
william_rain 发表于 2013-2-21 20:38 用指针 快些
最多设置5个标签!
谢谢您了……
您的程序对于我来说相对比较简单、易懂……
请大侠赐教用指针快速计算,小弟感激不尽
uchar Data_Process (uchar Originle_Data )
{
uchar Data_Temp[4] ;
uchar Data_H_FourBit , Data_L_FourBit ;
uchar i ;
Data_H_FourBit = Originle_Data << 4 ;
Data_L_FourBit = Originle_Data >> 4 ;
for (i=0 ; i<4 ; i++ )
{
Data_Temp[i] = ( Data_H_FourBit >> i )& 0x10 ;
}
for (i=0 ; i<4 ; i++ )
{
Data_H_FourBit |= Data_Temp[i] << ( 7-i ) ;
}
Originle_Data = Data_H_FourBit | Data_L_FourBit ;
return Originle_Data ;
}
一周热门 更多>