Skip to content

Commit 6db7342

Browse files
committed
manage I2C_IP_VERSION_V1 boards builds
1 parent d968b17 commit 6db7342

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

targets/TARGET_STM/i2c_api.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,10 +533,12 @@ void i2c_frequency(i2c_t *obj, int hz)
533533
HAL_I2CEx_ConfigAnalogFilter(handle, I2C_ANALOGFILTER_ENABLE);
534534
#endif
535535

536+
#ifdef I2C_IP_VERSION_V2
536537
#ifdef TARGET_STM32H7
537538
handle->Init.Timing = get_i2c_timing(obj_s->i2c, hz);
538539
#else
539540
handle->Init.Timing = get_i2c_timing(hz);
541+
#endif
540542
#endif
541543

542544
// I2C configuration

0 commit comments

Comments
 (0)