Fix: Prevent death restart caused by setting button pin to GPIO_NUM_NC (#98)
This commit is contained in:
parent
84f5674359
commit
87425b821c
@ -6,6 +6,7 @@ static const char* TAG = "Button";
|
||||
|
||||
Button::Button(gpio_num_t gpio_num, bool active_high) : gpio_num_(gpio_num) {
|
||||
if (gpio_num == GPIO_NUM_NC) {
|
||||
button_handle_ = NULL;
|
||||
return;
|
||||
}
|
||||
button_config_t button_config = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user