From cf70a9ca6112369527526dfe06bdb6b0f8604407 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 24 Dec 2021 16:27:17 -0500 Subject: [PATCH] Turn on I2C power for each VM, instead of just after hard reset --- ports/espressif/boards/adafruit_feather_esp32s2/board.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/board.c b/ports/espressif/boards/adafruit_feather_esp32s2/board.c index b0a7862ceb..93aff5067d 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2/board.c @@ -33,11 +33,6 @@ void board_init(void) { // USB common_hal_never_reset_pin(&pin_GPIO19); common_hal_never_reset_pin(&pin_GPIO20); - - // Turn on I2C - common_hal_never_reset_pin(&pin_GPIO7); - gpio_set_direction(7, GPIO_MODE_DEF_OUTPUT); - gpio_set_level(7, false); } bool board_requests_safe_mode(void) { @@ -45,7 +40,9 @@ bool board_requests_safe_mode(void) { } void reset_board(void) { - + // Turn on I2C power by default. + gpio_set_direction(7, GPIO_MODE_DEF_OUTPUT); + gpio_set_level(7, false); } void board_deinit(void) {