aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/stm32f1/include
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-06-21 15:45:38 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-06-22 14:06:10 -0400
commit70f22b667a7d91c68d663c1bf9ef1c0bdcbdd377 (patch)
tree4cb7a320aa0dac59d38b00d6357f2df8073a7e23 /libmaple/stm32f1/include
parent3ba9c0ecd6fd881d21292a369f8b7e45be5d2cb4 (diff)
downloadlibrambutan-70f22b667a7d91c68d663c1bf9ef1c0bdcbdd377.tar.gz
librambutan-70f22b667a7d91c68d663c1bf9ef1c0bdcbdd377.zip
I2C: Move F1-only errata workarounds out of libmaple/i2c.c.
The IRQ priority hack is unnecessary on targets with properly functioning I2C IRQ handlers, so we shouldn't use it unless we have to. Add a mechanism so a series header can provide such a hack if necessary. Have the F1 series header use this mechanism. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple/stm32f1/include')
-rw-r--r--libmaple/stm32f1/include/series/i2c.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libmaple/stm32f1/include/series/i2c.h b/libmaple/stm32f1/include/series/i2c.h
index 0c89df4..315a7e3 100644
--- a/libmaple/stm32f1/include/series/i2c.h
+++ b/libmaple/stm32f1/include/series/i2c.h
@@ -63,4 +63,7 @@ static inline uint32 _i2c_bus_clk(i2c_dev *dev) {
return STM32_PCLK1 / (1000 * 1000);
}
+#define _I2C_HAVE_IRQ_FIXUP 1
+void _i2c_irq_priority_fixup(i2c_dev *dev);
+
#endif /* _LIBMAPLE_STM32F1_I2C_H_ */