mirror of
https://github.com/esphome/esphome.git
synced 2025-01-03 11:21:43 +01:00
fix: Add pin->setup();
to matrix_keypad.cpp (#7163)
This commit is contained in:
parent
dff6884bed
commit
dd3dd7a136
1 changed files with 2 additions and 0 deletions
|
@ -8,6 +8,7 @@ static const char *const TAG = "matrix_keypad";
|
||||||
|
|
||||||
void MatrixKeypad::setup() {
|
void MatrixKeypad::setup() {
|
||||||
for (auto *pin : this->rows_) {
|
for (auto *pin : this->rows_) {
|
||||||
|
pin->setup();
|
||||||
if (!has_diodes_) {
|
if (!has_diodes_) {
|
||||||
pin->pin_mode(gpio::FLAG_INPUT);
|
pin->pin_mode(gpio::FLAG_INPUT);
|
||||||
} else {
|
} else {
|
||||||
|
@ -15,6 +16,7 @@ void MatrixKeypad::setup() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (auto *pin : this->columns_) {
|
for (auto *pin : this->columns_) {
|
||||||
|
pin->setup();
|
||||||
if (has_pulldowns_) {
|
if (has_pulldowns_) {
|
||||||
pin->pin_mode(gpio::FLAG_INPUT);
|
pin->pin_mode(gpio::FLAG_INPUT);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue