diff options
Diffstat (limited to 'include/button.h')
-rw-r--r-- | include/button.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/button.h b/include/button.h index e8344b308f..eedf7974f8 100644 --- a/include/button.h +++ b/include/button.h @@ -21,4 +21,24 @@ enum keyboard_button_type { KEYBOARD_BUTTON_COUNT }; +struct button_config { + const char *name; + enum keyboard_button_type type; + enum gpio_signal gpio; + uint32_t debounce_us; + int flags; +}; + +/* + * Defined in board.c. Should be CONFIG_BUTTON_COUNT elements long. + */ +extern const struct button_config buttons[]; + +/* + * Interrupt handler for button. + * + * @param signal Signal which triggered the interrupt. + */ +void button_interrupt(enum gpio_signal signal); + #endif /* __CROS_EC_BUTTON_H */ |