12 namespace matrix_keypad {
26 void setup()
override;
28 void dump_config()
override;
29 void set_columns(std::vector<GPIOPin *> pins) { columns_ = std::move(pins); };
30 void set_rows(std::vector<GPIOPin *> pins) { rows_ = std::move(pins); };
31 void set_keys(std::string keys) { keys_ = std::move(keys); };
43 int debounce_time_ = 0;
44 bool has_diodes_{
false};
45 bool has_pulldowns_{
false};
46 int pressed_key_ = -1;
48 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)
std::vector< MatrixKeyTrigger * > key_triggers_
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_