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

Function pin_init

components/drivers/i2c/dev_soft_i2c.c:143–149  ·  view source on GitHub ↗

* This function initializes the i2c pin. * @param i2c config class. */

Source from the content-addressed store, hash-verified

141* @param i2c config class.
142*/
143static void pin_init(const struct soft_i2c_config *cfg)
144{
145 rt_pin_mode(cfg->scl_pin, PIN_MODE_OUTPUT_OD);
146 rt_pin_mode(cfg->sda_pin, PIN_MODE_OUTPUT_OD);
147 rt_pin_write(cfg->scl_pin, PIN_HIGH);
148 rt_pin_write(cfg->sda_pin, PIN_HIGH);
149}
150
151
152/**

Callers 1

rt_soft_i2c_initFunction · 0.70

Calls 2

rt_pin_modeFunction · 0.50
rt_pin_writeFunction · 0.50

Tested by

no test coverage detected