aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-11-26 10:33:12 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-11-26 10:33:12 +0000
commit88247bf5e9b1f3c73894c5c10347416ad201fe0a (patch)
treed26301b389f45b688ec8d73baa3da7eb0e825509 /os/hal/ports
parentacdfdf158bfdf22bddd01a9fe98fa8fe45285523 (diff)
downloadChibiOS-88247bf5e9b1f3c73894c5c10347416ad201fe0a.tar.gz
ChibiOS-88247bf5e9b1f3c73894c5c10347416ad201fe0a.tar.bz2
ChibiOS-88247bf5e9b1f3c73894c5c10347416ad201fe0a.zip
Fixed bug #673.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8529 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports')
-rw-r--r--os/hal/ports/STM32/LLD/I2Cv2/i2c_lld.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/os/hal/ports/STM32/LLD/I2Cv2/i2c_lld.c b/os/hal/ports/STM32/LLD/I2Cv2/i2c_lld.c
index 991e77b01..a83ff2989 100644
--- a/os/hal/ports/STM32/LLD/I2Cv2/i2c_lld.c
+++ b/os/hal/ports/STM32/LLD/I2Cv2/i2c_lld.c
@@ -164,8 +164,8 @@ static void i2c_lld_setup_rx_transfer(I2CDriver *i2cp) {
/* Configures the CR2 registers with both the calculated and static
settings.*/
- dp->CR2 = (dp->CR2 & ~I2C_CR2_NBYTES) | i2cp->config->cr2 | I2C_CR2_RD_WRN |
- (n << 16U) | reload;
+ dp->CR2 = (dp->CR2 & ~(I2C_CR2_NBYTES | I2C_CR2_RELOAD)) | i2cp->config->cr2 |
+ I2C_CR2_RD_WRN | (n << 16U) | reload;
}
/**
@@ -192,7 +192,7 @@ static void i2c_lld_setup_tx_transfer(I2CDriver *i2cp) {
/* Configures the CR2 registers with both the calculated and static
settings.*/
- dp->CR2 = (dp->CR2 & ~I2C_CR2_NBYTES) | i2cp->config->cr2 |
+ dp->CR2 = (dp->CR2 & ~(I2C_CR2_NBYTES | I2C_CR2_RELOAD)) | i2cp->config->cr2 |
(n << 16U) | reload;
}