MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / generic_i2c_clock_pulse

Function generic_i2c_clock_pulse

bsp/dm365/drivers/i2c-davinci.c:121–134  ·  view source on GitHub ↗

Generate a pulse on the i2c clock pin. */

Source from the content-addressed store, hash-verified

119#if 0
120/* Generate a pulse on the i2c clock pin. */
121static void generic_i2c_clock_pulse(unsigned int scl_pin)
122{
123 rt_uint16_t i;
124
125 if (scl_pin) {
126 /* Send high and low on the SCL line */
127 for (i = 0; i < 9; i++) {
128 gpio_set_value(scl_pin, 0);
129 udelay(20);
130 gpio_set_value(scl_pin, 1);
131 udelay(20);
132 }
133 }
134}
135#endif
136
137/* This routine does i2c bus recovery as specified in the

Callers 1

i2c_recover_busFunction · 0.85

Calls 2

gpio_set_valueFunction · 0.70
udelayFunction · 0.70

Tested by

no test coverage detected