Set D13 to input with Pulldown

This commit is contained in:
Melissa LeBlanc-Williams 2023-09-01 15:03:08 -07:00
parent 8d6f9d06df
commit 7fe6cf5ed6
2 changed files with 6 additions and 4 deletions

View File

@ -39,8 +39,9 @@ void board_init(void) {
bool espressif_board_reset_pin_number(gpio_num_t pin_number) { bool espressif_board_reset_pin_number(gpio_num_t pin_number) {
if (pin_number == 13) { if (pin_number == 13) {
// Set D13 LED to output by default. // Set D13 LED to input when not in use
gpio_set_direction(pin_number, GPIO_MODE_DEF_OUTPUT); gpio_set_direction(pin_number, GPIO_MODE_DEF_INPUT);
gpio_set_pull_mode(pin_number, GPIO_PULLDOWN_ONLY);
return true; return true;
} }

View File

@ -39,8 +39,9 @@ void board_init(void) {
bool espressif_board_reset_pin_number(gpio_num_t pin_number) { bool espressif_board_reset_pin_number(gpio_num_t pin_number) {
if (pin_number == 13) { if (pin_number == 13) {
// Set D13 LED to output by default. // Set D13 LED to input when not in use
gpio_set_direction(pin_number, GPIO_MODE_DEF_OUTPUT); gpio_set_direction(pin_number, GPIO_MODE_DEF_INPUT);
gpio_set_pull_mode(pin_number, GPIO_PULLDOWN_ONLY);
return true; return true;
} }