* This function initializes the i2c pin. * @param i2c config class. */
| 141 | * @param i2c config class. |
| 142 | */ |
| 143 | static 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 | /** |
no test coverage detected