Home
last modified time | relevance | path

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

/hal_espressif-3.6.0/components/hal/esp32s3/include/hal/
Di2c_ll.h111 …atic inline void i2c_ll_cal_bus_clk(uint32_t source_clk, uint32_t bus_freq, i2c_clk_cal_t *clk_cal) in i2c_ll_cal_bus_clk() argument
117 clk_cal->clkm_div = clkm_div; in i2c_ll_cal_bus_clk()
118 clk_cal->scl_low = half_cycle; in i2c_ll_cal_bus_clk()
120 clk_cal->scl_high = (bus_freq <= 50000) ? half_cycle : (half_cycle / 5 * 4 + 4); in i2c_ll_cal_bus_clk()
121 clk_cal->scl_wait_high = half_cycle - clk_cal->scl_high; in i2c_ll_cal_bus_clk()
122 clk_cal->sda_hold = half_cycle / 2; in i2c_ll_cal_bus_clk()
124 clk_cal->sda_sample = half_cycle / 2; in i2c_ll_cal_bus_clk()
125 clk_cal->setup = half_cycle; in i2c_ll_cal_bus_clk()
126 clk_cal->hold = half_cycle; in i2c_ll_cal_bus_clk()
129 clk_cal->tout = (int)(sizeof(half_cycle) * 8 - __builtin_clz(5 * half_cycle)) + 2; in i2c_ll_cal_bus_clk()
/hal_espressif-3.6.0/components/hal/esp32s2/include/hal/
Di2c_ll.h108 …atic inline void i2c_ll_cal_bus_clk(uint32_t source_clk, uint32_t bus_freq, i2c_clk_cal_t *clk_cal) in i2c_ll_cal_bus_clk() argument
112 clk_cal->scl_low = half_cycle; in i2c_ll_cal_bus_clk()
114 clk_cal->scl_high = half_cycle / 2 + 2; in i2c_ll_cal_bus_clk()
115 clk_cal->scl_wait_high = half_cycle - clk_cal->scl_high; in i2c_ll_cal_bus_clk()
116 clk_cal->sda_hold = half_cycle / 2; in i2c_ll_cal_bus_clk()
118 clk_cal->sda_sample = half_cycle / 2 - 1; in i2c_ll_cal_bus_clk()
119 clk_cal->setup = half_cycle; in i2c_ll_cal_bus_clk()
120 clk_cal->hold = half_cycle; in i2c_ll_cal_bus_clk()
122 clk_cal->tout = half_cycle * 20; in i2c_ll_cal_bus_clk()
/hal_espressif-3.6.0/components/hal/esp32/include/hal/
Di2c_ll.h110 …atic inline void i2c_ll_cal_bus_clk(uint32_t source_clk, uint32_t bus_freq, i2c_clk_cal_t *clk_cal) in i2c_ll_cal_bus_clk() argument
113 clk_cal->scl_low = half_cycle; in i2c_ll_cal_bus_clk()
114 clk_cal->scl_high = half_cycle; in i2c_ll_cal_bus_clk()
115 clk_cal->sda_hold = half_cycle / 2; in i2c_ll_cal_bus_clk()
116 clk_cal->sda_sample = clk_cal->scl_high / 2; in i2c_ll_cal_bus_clk()
117 clk_cal->setup = half_cycle; in i2c_ll_cal_bus_clk()
118 clk_cal->hold = half_cycle; in i2c_ll_cal_bus_clk()
119 clk_cal->tout = half_cycle * 20; //default we set the timeout value to 10 bus cycles. in i2c_ll_cal_bus_clk()
/hal_espressif-3.6.0/components/hal/esp32h2/include/hal/
Di2c_ll.h116 …atic inline void i2c_ll_cal_bus_clk(uint32_t source_clk, uint32_t bus_freq, i2c_clk_cal_t *clk_cal) in i2c_ll_cal_bus_clk() argument
122 clk_cal->clkm_div = clkm_div; in i2c_ll_cal_bus_clk()
123 clk_cal->scl_low = half_cycle; in i2c_ll_cal_bus_clk()
126 clk_cal->scl_wait_high = scl_wait_high; in i2c_ll_cal_bus_clk()
127 clk_cal->scl_high = half_cycle - scl_wait_high; in i2c_ll_cal_bus_clk()
128 clk_cal->sda_hold = half_cycle / 4; in i2c_ll_cal_bus_clk()
130 clk_cal->sda_sample = half_cycle / 2; in i2c_ll_cal_bus_clk()
131 clk_cal->setup = half_cycle; in i2c_ll_cal_bus_clk()
132 clk_cal->hold = half_cycle; in i2c_ll_cal_bus_clk()
135 clk_cal->tout = (int)(sizeof(half_cycle) * 8 - __builtin_clz(5 * half_cycle)) + 2; in i2c_ll_cal_bus_clk()
/hal_espressif-3.6.0/components/hal/esp32c3/include/hal/
Di2c_ll.h120 …atic inline void i2c_ll_cal_bus_clk(uint32_t source_clk, uint32_t bus_freq, i2c_clk_cal_t *clk_cal) in i2c_ll_cal_bus_clk() argument
126 clk_cal->clkm_div = clkm_div; in i2c_ll_cal_bus_clk()
127 clk_cal->scl_low = half_cycle; in i2c_ll_cal_bus_clk()
130 clk_cal->scl_wait_high = scl_wait_high; in i2c_ll_cal_bus_clk()
131 clk_cal->scl_high = half_cycle - scl_wait_high; in i2c_ll_cal_bus_clk()
132 clk_cal->sda_hold = half_cycle / 4; in i2c_ll_cal_bus_clk()
134 clk_cal->sda_sample = half_cycle / 2; in i2c_ll_cal_bus_clk()
135 clk_cal->setup = half_cycle; in i2c_ll_cal_bus_clk()
136 clk_cal->hold = half_cycle; in i2c_ll_cal_bus_clk()
139 clk_cal->tout = (int)(sizeof(half_cycle) * 8 - __builtin_clz(5 * half_cycle)) + 2; in i2c_ll_cal_bus_clk()
/hal_espressif-3.6.0/components/hal/
Di2c_hal.c186 i2c_clk_cal_t clk_cal = {0}; in i2c_hal_set_bus_timing() local
188 i2c_ll_cal_bus_clk(sclk, scl_hw_freq, &clk_cal); in i2c_hal_set_bus_timing()
189 i2c_ll_set_bus_timing(hal->dev, &clk_cal); in i2c_hal_set_bus_timing()