From c23a4c4334960b4c136e5cdb5b09556ea0d7c9a8 Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Wed, 11 Aug 2010 15:43:47 -0700 Subject: Removed NACK checking so things don't barf when daughterboards aren't connected. When we have real error handling in the DUDE/BRO protocol we'll add this back in. --- firmware/microblaze/lib/i2c.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'firmware/microblaze') diff --git a/firmware/microblaze/lib/i2c.c b/firmware/microblaze/lib/i2c.c index 216b01800..177341267 100644 --- a/firmware/microblaze/lib/i2c.c +++ b/firmware/microblaze/lib/i2c.c @@ -145,11 +145,12 @@ static void i2c_irq_handler(unsigned irq) { //printf("I2C irq handler\n"); //first let's make sure nothing is f'ed up - if(((i2c_regs->cmd_status & I2C_ST_RXACK) != 0) && i2c_dir == I2C_DIR_WRITE) { //we got a NACK and we didn't send it - printf("\tNACK received\n"); - i2c_async_err(); - return; - }// else printf("\tACK received, proceeding\n"); + //TODO: uncomment this error checking when we have some way to handle errors +// if(((i2c_regs->cmd_status & I2C_ST_RXACK) != 0) && i2c_dir == I2C_DIR_WRITE) { //we got a NACK and we didn't send it +// printf("\tNACK received\n"); +// i2c_async_err(); +// return; +// }// else printf("\tACK received, proceeding\n"); if(i2c_regs->cmd_status & I2C_ST_AL) { printf("\tArbitration lost!\n"); @@ -223,7 +224,7 @@ static void i2c_irq_handler(unsigned irq) { default: //terrible things have happened. - printf("you fail at life.\n"); + break; } } -- cgit v1.2.3