File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ void i2c_init_internal(i2c_t *obj, const i2c_pinmap_t *pinmap)
300
300
obj_s -> event_i2cIRQ = I2C1_EV_IRQn ;
301
301
obj_s -> error_i2cIRQ = I2C1_ER_IRQn ;
302
302
303
- #if defined(TARGET_STM32WL )
303
+ #if defined(TARGET_STM32WL ) || defined( TARGET_STM32WB )
304
304
/* In Stop2 mode, I2C1 and I2C2 instances are powered down (only I2C3 register content is kept) */
305
305
sleep_manager_lock_deep_sleep ();
306
306
#endif
@@ -395,7 +395,7 @@ void i2c_deinit_internal(i2c_t *obj)
395
395
#if defined I2C1_BASE
396
396
if (obj_s -> i2c == I2C_1 ) {
397
397
__HAL_RCC_I2C1_CLK_DISABLE ();
398
- #if defined(TARGET_STM32WL )
398
+ #if defined(TARGET_STM32WL ) || defined( TARGET_STM32WB )
399
399
sleep_manager_unlock_deep_sleep ();
400
400
#endif
401
401
}
@@ -424,8 +424,8 @@ void i2c_deinit_internal(i2c_t *obj)
424
424
}
425
425
#endif
426
426
427
- pin_mode (obj_s -> sda , PullNone );
428
- pin_mode (obj_s -> scl , PullNone );
427
+ pin_function (obj_s -> sda , STM_PIN_DATA ( STM_MODE_ANALOG , GPIO_NOPULL , 0 ) );
428
+ pin_function (obj_s -> scl , STM_PIN_DATA ( STM_MODE_ANALOG , GPIO_NOPULL , 0 ) );
429
429
430
430
obj_s -> sda = NC ;
431
431
obj_s -> scl = NC ;
You can’t perform that action at this time.
0 commit comments