summaryrefslogtreecommitdiff
path: root/include/button.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/button.h')
-rw-r--r--include/button.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/button.h b/include/button.h
index 3c6a350b3b..2961625bea 100644
--- a/include/button.h
+++ b/include/button.h
@@ -51,7 +51,11 @@ enum button {
};
/* Table of buttons for the board. */
+#ifndef CONFIG_BUTTONS_RUNTIME_CONFIG
extern const struct button_config buttons[];
+#else
+extern struct button_config buttons[];
+#endif
/*
* Buttons used to decide whether recovery is requested or not
@@ -65,6 +69,17 @@ extern const int recovery_buttons_count;
void button_init(void);
/*
+ * Reassign a button GPIO signal at runtime.
+ *
+ * @param button_type Button type to reassign
+ * @param gpio GPIO to assign to the button
+ *
+ * Returns EC_SUCCESS if button change is accepted and made active,
+ * EC_ERROR_* otherwise.
+ */
+int button_reassign_gpio(enum button button_type, enum gpio_signal gpio);
+
+/*
* Interrupt handler for button.
*
* @param signal Signal which triggered the interrupt.