summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfishsoupisgood <github@madingley.org>2020-06-15 14:24:30 +0100
committerfishsoupisgood <github@madingley.org>2020-06-15 14:24:30 +0100
commit4f720ba83341b17dd6aea0e613878e6928505b00 (patch)
treeca77f6427c1db31227a5fc4dfec564063ad93dab
parent4ced1453cee7a3131459040efd57f73bfc77aece (diff)
downloadrobs_speedo-4f720ba83341b17dd6aea0e613878e6928505b00.tar.gz
robs_speedo-4f720ba83341b17dd6aea0e613878e6928505b00.tar.bz2
robs_speedo-4f720ba83341b17dd6aea0e613878e6928505b00.zip
moar
-rw-r--r--app/i2c_hw.c6
-rw-r--r--app/prototypes.h1
-rw-r--r--app/ticker.c1
3 files changed, 8 insertions, 0 deletions
diff --git a/app/i2c_hw.c b/app/i2c_hw.c
index 59d2451..a17c564 100644
--- a/app/i2c_hw.c
+++ b/app/i2c_hw.c
@@ -229,6 +229,12 @@ i2cp1_dma_in_progress (void)
return ! (DMA1_ISR & (DMA_ISR_TCIF6 | DMA_ISR_TEIF6));
}
+int
+i2cp2_dma_in_progress (void)
+{
+ return ! (DMA1_ISR & (DMA_ISR_TCIF4 | DMA_ISR_TEIF4));
+}
+
void
i2cp1_stop_dma (void)
{
diff --git a/app/prototypes.h b/app/prototypes.h
index d7c2a97..4eb3605 100644
--- a/app/prototypes.h
+++ b/app/prototypes.h
@@ -50,6 +50,7 @@ extern void i2cp2_reset_sm(void);
extern void i2cp1_start_dma(uint8_t *buf, int len);
extern void i2cp2_start_dma(uint8_t *buf, int len);
extern int i2cp1_dma_in_progress(void);
+extern int i2cp2_dma_in_progress(void);
extern void i2cp1_stop_dma(void);
extern void i2cp2_stop_dma(void);
extern void i2cp_reset(uint32_t i2c);
diff --git a/app/ticker.c b/app/ticker.c
index 6950c6b..8df4d38 100644
--- a/app/ticker.c
+++ b/app/ticker.c
@@ -25,6 +25,7 @@ sys_tick_handler (void)
led_tick();
oled1_ticker();
oled2_ticker();
+ gauge_ticker();
ticks++;
}