aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-06 13:37:08 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-06 13:37:08 +0000
commit6777c09f08b8c20f67879a59aaefc588bb6e7371 (patch)
treea44b53b7be8fc415e790bb2823eaf4eab7eb6251 /os/hal/platforms/STM32
parent1253ee88be70e16fe9057b5e1727f8664fa0c4ae (diff)
downloadChibiOS-6777c09f08b8c20f67879a59aaefc588bb6e7371.tar.gz
ChibiOS-6777c09f08b8c20f67879a59aaefc588bb6e7371.tar.bz2
ChibiOS-6777c09f08b8c20f67879a59aaefc588bb6e7371.zip
I2C. Added checks. Cleaned copypaste errors.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3559 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32')
-rw-r--r--os/hal/platforms/STM32/i2c_lld.c5
-rw-r--r--os/hal/platforms/STM32/i2c_lld.h14
2 files changed, 3 insertions, 16 deletions
diff --git a/os/hal/platforms/STM32/i2c_lld.c b/os/hal/platforms/STM32/i2c_lld.c
index 78a2b334a..3b8650dde 100644
--- a/os/hal/platforms/STM32/i2c_lld.c
+++ b/os/hal/platforms/STM32/i2c_lld.c
@@ -356,8 +356,9 @@ void i2c_lld_start(I2CDriver *i2cp) {
NVICEnableVector(I2C1_ER_IRQn,
CORTEX_PRIORITY_MASK(STM32_I2C_I2C1_IRQ_PRIORITY));
- i2cp->dmamode |= STM32_DMA_CR_CHSEL(I2C1_RX_DMA_CHANNEL) |
- STM32_DMA_CR_PL(STM32_I2C_I2C1_DMA_PRIORITY);
+ i2cp->dmamode |= STM32_DMA_CR_CHSEL(I2C1_RX_DMA_CHANNEL) | \
+ STM32_DMA_CR_PL(STM32_I2C_I2C1_DMA_PRIORITY);
+ __NOP();
}
#endif /* STM32_I2C_USE_I2C1 */
diff --git a/os/hal/platforms/STM32/i2c_lld.h b/os/hal/platforms/STM32/i2c_lld.h
index f57bead5f..b2b346c7d 100644
--- a/os/hal/platforms/STM32/i2c_lld.h
+++ b/os/hal/platforms/STM32/i2c_lld.h
@@ -194,20 +194,6 @@
#error "I2C driver activated but no I2C peripheral assigned"
#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#if STM32_I2C_USE_I2C1 && \
!STM32_DMA_IS_VALID_ID(STM32_I2C_I2C1_RX_DMA_STREAM, \
STM32_I2C1_RX_DMA_MSK)