Skip to content

Commit a4fb401

Browse files
benwafflefpistm
authored andcommitted
twi: fix copy-paste error (stm32duino#504)
* twi: fix copy-paste error * use I2C_OK instead of HAL_OK
1 parent 64fbe82 commit a4fb401

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: cores/arduino/stm32/twi.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -391,11 +391,11 @@ i2c_status_e i2c_master_read(i2c_t *obj, uint8_t dev_address, uint8_t *data, uin
391391
*/
392392
i2c_status_e i2c_IsDeviceReady(i2c_t *obj, uint8_t devAddr, uint32_t trials)
393393
{
394-
i2c_status_e ret = HAL_OK;
394+
i2c_status_e ret = I2C_OK;
395395

396396
switch (HAL_I2C_IsDeviceReady(&(obj->handle), devAddr, trials, I2C_TIMEOUT_TICK)) {
397397
case HAL_OK:
398-
ret = HAL_OK;
398+
ret = I2C_OK;
399399
break;
400400
case HAL_TIMEOUT:
401401
ret = I2C_TIMEOUT;

0 commit comments

Comments
 (0)