Skip to content

Commit

Permalink
Turn on I2C power for each VM, instead of just after hard reset
Browse files Browse the repository at this point in the history
  • Loading branch information
dhalbert committed Dec 24, 2021
1 parent 889b25d commit cf70a9c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ports/espressif/boards/adafruit_feather_esp32s2/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,16 @@ 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) {
return false;
}

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) {
Expand Down

0 comments on commit cf70a9c

Please sign in to comment.