mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 19:32:19 +01:00
fix: Add pin->setup();
to matrix_keypad.cpp (#7163)
This commit is contained in:
@@ -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 {
|
||||||
|
Reference in New Issue
Block a user