11 namespace matrix_keypad {
23 void setup()
override;
25 void dump_config()
override;
26 void set_columns(std::vector<GPIOPin *> pins) { columns_ = std::move(pins); };
27 void set_rows(std::vector<GPIOPin *> pins) { rows_ = std::move(pins); };
28 void set_keys(std::string keys) { keys_ = std::move(keys); };
39 int debounce_time_ = 0;
40 bool has_diodes_{
false};
41 bool has_pulldowns_{
false};
42 int pressed_key_ = -1;
44 std::vector<MatrixKeypadListener *> listeners_{};
void set_rows(std::vector< GPIOPin *> pins)
interface for components that provide keypresses
void set_has_pulldowns(int has_pulldowns)
void set_columns(std::vector< GPIOPin *> pins)
virtual void key_released(uint8_t key)
void set_debounce_time(int debounce_time)
virtual void button_pressed(int row, int col)
std::vector< GPIOPin * > columns_
virtual void button_released(int row, int col)
virtual void key_pressed(uint8_t key)
void set_has_diodes(int has_diodes)
void set_keys(std::string keys)
Implementation of SPI Controller mode.
std::vector< GPIOPin * > rows_