Use the timer to kick off WMP readings regularly.
This commit is contained in:
4
i2c.c
4
i2c.c
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user