Pull Feather S2 TFT LED down on reset

This commit is contained in:
Scott Shawcroft 2022-08-09 10:42:56 -07:00
parent f3ca15265e
commit ce1273be7a
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA

View File

@ -144,6 +144,18 @@ bool espressif_board_reset_pin_number(gpio_num_t pin_number) {
gpio_set_level(21, true);
return true;
}
// Pull LED down on reset rather than the default up
if (pin_number == 13) {
gpio_config_t cfg = {
.pin_bit_mask = BIT64(pin_number),
.mode = GPIO_MODE_DISABLE,
.pull_up_en = false,
.pull_down_en = true,
.intr_type = GPIO_INTR_DISABLE,
};
gpio_config(&cfg);
return true;
}
return false;
}