Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
Diff: targets/TARGET_STM/i2c_api.c
- 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;