mbed
Fork of mbed-dev by
Diff: targets/TARGET_STM/i2c_api.c
- Revision:
- 171:19eb464bc2be
- Parent:
- 165:e614a9f1c9e2
- Child:
- 178:d650f5d4c87a
diff -r e3b6fe271b81 -r 19eb464bc2be targets/TARGET_STM/i2c_api.c --- a/targets/TARGET_STM/i2c_api.c Wed Jul 19 17:31:21 2017 +0100 +++ b/targets/TARGET_STM/i2c_api.c Thu Aug 03 13:13:39 2017 +0100 @@ -743,13 +743,6 @@ int count = I2C_ERROR_BUS_BUSY, ret = 0; uint32_t timeout = 0; - if((length == 0) || (data == 0)) { - if(HAL_I2C_IsDeviceReady(handle, address, 1, 10) == HAL_OK) - return 0; - else - return I2C_ERROR_BUS_BUSY; - } - if ((obj_s->XferOperation == I2C_FIRST_AND_LAST_FRAME) || (obj_s->XferOperation == I2C_LAST_FRAME)) { if (stop) @@ -802,13 +795,6 @@ int count = I2C_ERROR_BUS_BUSY, ret = 0; uint32_t timeout = 0; - if((length == 0) || (data == 0)) { - if(HAL_I2C_IsDeviceReady(handle, address, 1, 10) == HAL_OK) - return 0; - else - return I2C_ERROR_BUS_BUSY; - } - if ((obj_s->XferOperation == I2C_FIRST_AND_LAST_FRAME) || (obj_s->XferOperation == I2C_LAST_FRAME)) { if (stop)