aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-27 19:49:48 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-27 19:49:48 +0000
commite5ce81050f699c61b43aa74384d011c861fb31f2 (patch)
treefb344c8f0a469e5eb68701f08e417d1037215081 /os/hal/platforms/STM32
parent8ab75bd9f7f15dd9cda6719808555663626eadbd (diff)
downloadChibiOS-e5ce81050f699c61b43aa74384d011c861fb31f2.tar.gz
ChibiOS-e5ce81050f699c61b43aa74384d011c861fb31f2.tar.bz2
ChibiOS-e5ce81050f699c61b43aa74384d011c861fb31f2.zip
I2C. Minor fixes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3540 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32')
-rw-r--r--os/hal/platforms/STM32/i2c_lld.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/os/hal/platforms/STM32/i2c_lld.c b/os/hal/platforms/STM32/i2c_lld.c
index a0914e819..c5cd2308f 100644
--- a/os/hal/platforms/STM32/i2c_lld.c
+++ b/os/hal/platforms/STM32/i2c_lld.c
@@ -86,7 +86,7 @@ static volatile uint16_t dbgCR2 = 0;
/* Driver local functions. */
/*===========================================================================*/
#if I2C_SUPPORTS_CALLBACKS
-#if !(STM32_I2C_I2C1_USE_POLLING_WAIT)
+#if (!(STM32_I2C_I2C1_USE_POLLING_WAIT)) && STM32_I2C_USE_I2C1
/* I2C1 GPT callback. */
static void i2c1gptcb(GPTDriver *gptp) {
(void)gptp;
@@ -120,7 +120,7 @@ static const GPTConfig i2c1gptcfg = {
};
#endif /* STM32_I2C_I2C1_USE_POLLING_WAIT */
-#if !(STM32_I2C_I2C2_USE_POLLING_WAIT)
+#if (!(STM32_I2C_I2C2_USE_POLLING_WAIT)) && STM32_I2C_USE_I2C2
/* I2C2 GPT callback. */
static void i2c2gptcb(GPTDriver *gptp) {
(void)gptp;