mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 11:47:30 +01:00
fix: Add pin->setup();
to matrix_keypad.cpp (#7163)
This commit is contained in:
parent
dff6884bed
commit
dd3dd7a136
@ -8,6 +8,7 @@ static const char *const TAG = "matrix_keypad";
|
||||
|
||||
void MatrixKeypad::setup() {
|
||||
for (auto *pin : this->rows_) {
|
||||
pin->setup();
|
||||
if (!has_diodes_) {
|
||||
pin->pin_mode(gpio::FLAG_INPUT);
|
||||
} else {
|
||||
@ -15,6 +16,7 @@ void MatrixKeypad::setup() {
|
||||
}
|
||||
}
|
||||
for (auto *pin : this->columns_) {
|
||||
pin->setup();
|
||||
if (has_pulldowns_) {
|
||||
pin->pin_mode(gpio::FLAG_INPUT);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user