Home
last modified time | relevance | path

Searched refs:best_scl (Results 1 – 2 of 2) sorted by relevance

/hal_nxp-3.5.0/mcux/mcux-sdk/drivers/flexcomm/i2c/
Dfsl_i2c.c322 uint32_t best_scl = 0U; in I2C_MasterSetBaudRate() local
332 best_scl = 8000000U / baudRate_Bps; in I2C_MasterSetBaudRate()
334 if ((8000000U / best_scl - baudRate_Bps) > (baudRate_Bps - (8000000U / (best_scl + 1U)))) in I2C_MasterSetBaudRate()
336 best_scl = best_scl + 1U; in I2C_MasterSetBaudRate()
344 …if ((best_scl > 18U) || ((best_scl < 4U)) || ((baudRate_Bps == 400000U) && (srcClock_Hz / best_div… in I2C_MasterSetBaudRate()
372 best_scl = scl; in I2C_MasterSetBaudRate()
387 if (best_scl % 2U == 0U) in I2C_MasterSetBaudRate()
389 …base->MSTTIME = I2C_MSTTIME_MSTSCLLOW(best_scl / 2U - 2U) | I2C_MSTTIME_MSTSCLHIGH(best_scl / 2U -… in I2C_MasterSetBaudRate()
393 …base->MSTTIME = I2C_MSTTIME_MSTSCLLOW(best_scl / 2U - 1U) | I2C_MSTTIME_MSTSCLHIGH(best_scl / 2U -… in I2C_MasterSetBaudRate()
/hal_nxp-3.5.0/mcux/mcux-sdk/drivers/lpc_i2c/
Dfsl_i2c.c203 uint32_t best_scl = 0; in I2C_MasterSetBaudRate() local
222 best_scl = scl; in I2C_MasterSetBaudRate()
235 base->MSTTIME = I2C_MSTTIME_MSTSCLLOW(best_scl - 2U) | I2C_MSTTIME_MSTSCLHIGH(best_scl - 2U); in I2C_MasterSetBaudRate()