I2C_masterReceiveSingle() is intended to be used in an interrupt handler (or in the equivalent polling code). To receive the last byte in a transaction and send NACK+STOP afterwards, use I2C_masterReceiveSingleByte().
↧