fix: compile error in keil c51
This commit is contained in:
parent
43424ca5be
commit
a41cba9eec
@ -77,7 +77,10 @@ uint8_t DS18B20_ReadByte(void)
|
||||
while (i--)
|
||||
{
|
||||
byte >>= 1;
|
||||
byte |= (DS18B20_ReadBit() << 7);
|
||||
if (DS18B20_ReadBit())
|
||||
{
|
||||
byte |= 0x80;
|
||||
}
|
||||
}
|
||||
return byte;
|
||||
}
|
||||
|
@ -77,7 +77,10 @@ uint8_t DS18B20_ReadByte(void)
|
||||
while (i--)
|
||||
{
|
||||
byte >>= 1;
|
||||
byte |= (DS18B20_ReadBit() << 7);
|
||||
if (DS18B20_ReadBit())
|
||||
{
|
||||
byte |= 0x80;
|
||||
}
|
||||
}
|
||||
return byte;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user