summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-08-11 15:43:47 -0700
committerNick Foster <nick@nerdnetworks.org>2010-08-16 17:29:40 -0700
commitc23a4c4334960b4c136e5cdb5b09556ea0d7c9a8 (patch)
treecf6d2a311d33e15c5a4efd6158002b17a3eb5739
parent936c5518e47f797c062c0ac5de0e5bd1452c7a0d (diff)
downloaduhd-c23a4c4334960b4c136e5cdb5b09556ea0d7c9a8.tar.gz
uhd-c23a4c4334960b4c136e5cdb5b09556ea0d7c9a8.tar.bz2
uhd-c23a4c4334960b4c136e5cdb5b09556ea0d7c9a8.zip
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.
-rw-r--r--firmware/microblaze/lib/i2c.c13
1 files changed, 7 insertions, 6 deletions
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;
}
}