We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 63d3096 commit c83db2eCopy full SHA for c83db2e
libraries/Wire/src/utility/twi.c
@@ -804,6 +804,9 @@ void i2c_deinit(i2c_t *obj)
804
HAL_NVIC_DisableIRQ(obj->irqER);
805
#endif /* !STM32C0xx && !STM32F0xx && !STM32G0xx && !STM32L0xx */
806
HAL_I2C_DeInit(&(obj->handle));
807
+ /* Reset I2C GPIO pins as INPUT_ANALOG */
808
+ pin_function(obj->scl, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0));
809
+ pin_function(obj->sda, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0));
810
// Reset I2Cx and disable clock
811
#if defined I2C1_BASE
812
if (obj->i2c == I2C1) {
0 commit comments