Skip to content

Commit

Permalink
remove debug messages and commented out example code
Browse files Browse the repository at this point in the history
  • Loading branch information
rambo committed Aug 13, 2012
1 parent 3179c8b commit ac58df7
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions I2C.cpp
Expand Up @@ -685,21 +685,6 @@ uint8_t I2C::receiveByte(uint8_t ack)
uint8_t I2C::receiveByte(uint8_t ack, uint8_t *target)
{
uint8_t stat = I2C::receiveByte(ack);
/*
if( i == nack )
{
returnStatus = receiveByte(0);
if(returnStatus == 1){return(6);}
if(returnStatus != MR_DATA_NACK){return(returnStatus);}
}
else
{
returnStatus = receiveByte(1);
if(returnStatus == 1){return(6);}
if(returnStatus != MR_DATA_ACK){return(returnStatus);}
}
*/
if (stat == 1)
{
return(6);
Expand All @@ -708,7 +693,6 @@ uint8_t I2C::receiveByte(uint8_t ack, uint8_t *target)
{
if(stat != MR_DATA_ACK)
{
Serial.println(F("DEBUG I2C::receiveByte unexpected return, ACK expected"));
*target = 0x0;
return(stat);
}
Expand All @@ -717,12 +701,10 @@ uint8_t I2C::receiveByte(uint8_t ack, uint8_t *target)
{
if(stat != MR_DATA_NACK)
{
Serial.println(F("DEBUG I2C::receiveByte unexpected return, NACK expected"));
*target = 0x0;
return(stat);
}
}
Serial.println(F("DEBUG I2C::receiveByte ok"));
*target = TWDR;
// I suppose that if we get this far we're ok
return 0;
Expand Down

0 comments on commit ac58df7

Please sign in to comment.