Change read_bit() to return 0 or -1UL, rather than 0 or 1.

This commit is contained in:
Michael Brown
2006-06-12 19:29:50 +00:00
parent 2e49441535
commit 51a36f1cfb
3 changed files with 7 additions and 3 deletions

View File

@@ -153,7 +153,7 @@ static uint8_t i2c_recv_byte ( struct bit_basher *basher ) {
/* Receive byte */
for ( i = 8 ; i ; i-- ) {
value <<= 1;
value |= i2c_recv_bit ( basher );
value |= ( i2c_recv_bit ( basher ) & 0x1 );
}
/* Send NACK */