File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ void board_init(void)
70
70
#endif
71
71
72
72
// Button
73
- gpio_pad_select_gpio (BUTTON_PIN );
73
+ esp_rom_gpio_pad_select_gpio (BUTTON_PIN );
74
74
gpio_set_direction (BUTTON_PIN , GPIO_MODE_INPUT );
75
75
gpio_set_pull_mode (BUTTON_PIN , BUTTON_STATE_ACTIVE ? GPIO_PULLDOWN_ONLY : GPIO_PULLUP_ONLY );
76
76
@@ -98,7 +98,12 @@ static void configure_pins(usb_hal_context_t *usb)
98
98
esp_rom_gpio_connect_out_signal (iopin -> pin , iopin -> func , false, false);
99
99
} else {
100
100
esp_rom_gpio_connect_in_signal (iopin -> pin , iopin -> func , false);
101
- if ((iopin -> pin != GPIO_FUNC_IN_LOW ) && (iopin -> pin != GPIO_FUNC_IN_HIGH )) {
101
+ #if ESP_IDF_VERSION_MAJOR > 4
102
+ if ((iopin -> pin != GPIO_MATRIX_CONST_ZERO_INPUT ) && (iopin -> pin != GPIO_MATRIX_CONST_ONE_INPUT ))
103
+ #else
104
+ if ((iopin -> pin != GPIO_FUNC_IN_LOW ) && (iopin -> pin != GPIO_FUNC_IN_HIGH ))
105
+ #endif
106
+ {
102
107
gpio_ll_input_enable (& GPIO , iopin -> pin );
103
108
}
104
109
}
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ void board_init(void)
70
70
#endif
71
71
72
72
// Button
73
- gpio_pad_select_gpio (BUTTON_PIN );
73
+ esp_rom_gpio_pad_select_gpio (BUTTON_PIN );
74
74
gpio_set_direction (BUTTON_PIN , GPIO_MODE_INPUT );
75
75
gpio_set_pull_mode (BUTTON_PIN , BUTTON_STATE_ACTIVE ? GPIO_PULLDOWN_ONLY : GPIO_PULLUP_ONLY );
76
76
@@ -98,7 +98,12 @@ static void configure_pins(usb_hal_context_t *usb)
98
98
esp_rom_gpio_connect_out_signal (iopin -> pin , iopin -> func , false, false);
99
99
} else {
100
100
esp_rom_gpio_connect_in_signal (iopin -> pin , iopin -> func , false);
101
- if ((iopin -> pin != GPIO_FUNC_IN_LOW ) && (iopin -> pin != GPIO_FUNC_IN_HIGH )) {
101
+ #if ESP_IDF_VERSION_MAJOR > 4
102
+ if ((iopin -> pin != GPIO_MATRIX_CONST_ZERO_INPUT ) && (iopin -> pin != GPIO_MATRIX_CONST_ONE_INPUT ))
103
+ #else
104
+ if ((iopin -> pin != GPIO_FUNC_IN_LOW ) && (iopin -> pin != GPIO_FUNC_IN_HIGH ))
105
+ #endif
106
+ {
102
107
gpio_ll_input_enable (& GPIO , iopin -> pin );
103
108
}
104
109
}
You can’t perform that action at this time.
0 commit comments