mbed library sources. Supersedes mbed-src. Fixed broken STM32F1xx RTC on rtc_api.c

Dependents:   Nucleo_F103RB_RTC_battery_bkup_pwr_off_okay

Fork of mbed-dev by mbed official

Revision:
157:ff67d9f36b67
Parent:
156:95d6b41a828b
Child:
158:b23ee177fd68
--- a/targets/TARGET_STM/i2c_api.c	Mon Jan 16 15:03:32 2017 +0000
+++ b/targets/TARGET_STM/i2c_api.c	Thu Feb 02 17:01:33 2017 +0000
@@ -627,10 +627,9 @@
         }
     }
 
-    /*  Enable reload mode as we don't know how many bytes will eb sent */
-    handle->Instance->CR2 |= I2C_CR2_RELOAD;
-    /*  Set transfer size to 1 */
-    handle->Instance->CR2 |= (I2C_CR2_NBYTES & (1 << 16));
+    /* Enable reload mode as we don't know how many bytes will be sent */
+    /* and set transfer size to 1 */
+    tmpreg |= I2C_CR2_RELOAD | (I2C_CR2_NBYTES & (1 << 16));
     /* Set the prepared configuration */
     handle->Instance->CR2 = tmpreg;