Use the timer to kick off WMP readings regularly.

This commit is contained in:
2011-06-04 20:56:20 +00:00
parent fda1b2a672
commit 65b11ff92e
5 changed files with 56 additions and 11 deletions

4
i2c.c
View File

@@ -1,6 +1,7 @@
#include "i2c.h"
#include "interrupt.h"
#include "event.h"
#define I2CBASE 0xE001C000
@@ -108,6 +109,7 @@ void __attribute__((interrupt("IRQ"))) i2c_interrupt_handler(void)
i2c_transaction = NULL;
IREG(I2CONSET) = STOFLAG;
IREG(I2CONCLR) = STAFLAG | AAFLAG | SIFLAG;
event_set(EVENT_I2C_COMPLETE);
}
}
break;
@@ -138,6 +140,7 @@ void __attribute__((interrupt("IRQ"))) i2c_interrupt_handler(void)
i2c_transaction = NULL;
IREG(I2CONSET) = STOFLAG;
IREG(I2CONCLR) = STAFLAG | AAFLAG | SIFLAG;
event_set(EVENT_I2C_COMPLETE);
}
break;
@@ -150,6 +153,7 @@ void __attribute__((interrupt("IRQ"))) i2c_interrupt_handler(void)
i2c_transaction = NULL;
IREG(I2CONSET) = STOFLAG;
IREG(I2CONCLR) = STAFLAG | AAFLAG | SIFLAG;
event_set(EVENT_I2C_COMPLETE);
break;
/* We don't handle slave mode */