diff options
Diffstat (limited to 'LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c')
-rw-r--r-- | LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c b/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c index 2f65921ca..d4f594f3b 100644 --- a/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c +++ b/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c @@ -117,7 +117,7 @@ uint8_t TWI_ReadPacket(const uint8_t SlaveAddress, { while (Length--) { - if (!(TWI_ReceiveByte(Buffer++, (Length == 0)))) + if (!(TWI_ReceiveByte(Buffer++, (Length == 1)))) { ErrorCode = TWI_ERROR_SlaveNAK; break; |