Home
last modified time | relevance | path

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

/device/google/contexthub/firmware/src/platform/stm32f4xx/
Di2c.c313 int ccr, ccr_1, ccr_2; in stmI2cSpeedSet() local
332 ccr_2 = apb1_clk / (speed * 25); in stmI2cSpeedSet()
333 if (ccr_2 == 0 || apb1_clk / (ccr_2 * 25) > speed) in stmI2cSpeedSet()
334 ccr_2 ++; in stmI2cSpeedSet()
336 if ((apb1_clk / (ccr_1 * 3)) > (apb1_clk / (ccr_2 * 25))) in stmI2cSpeedSet()
339 regs->CCR = I2C_CCR_FM | I2C_CCR_DUTY_16_9 | I2C_CCR(ccr_2); in stmI2cSpeedSet()