summaryrefslogtreecommitdiff
path: root/include/keyboard_mkbp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/keyboard_mkbp.h')
-rw-r--r--include/keyboard_mkbp.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/keyboard_mkbp.h b/include/keyboard_mkbp.h
index 5ea3c54593..054593d1b4 100644
--- a/include/keyboard_mkbp.h
+++ b/include/keyboard_mkbp.h
@@ -9,6 +9,7 @@
#define __CROS_EC_KEYBOARD_MKBP_H
#include "common.h"
+#include "keyboard_config.h"
/**
* Add keyboard state into FIFO
@@ -18,6 +19,20 @@
int keyboard_fifo_add(const uint8_t *buffp);
/**
+ * Add an element to the common MKBP FIFO.
+ *
+ * @param event_type The MKBP event type.
+ * @param buffp Pointer to the event data to enqueue.
+ * @return EC_SUCCESS if entry added, EC_ERROR_OVERFLOW if FIFO is full.
+ */
+int mkbp_fifo_add(uint8_t event_type, const uint8_t *buffp);
+
+/**
+ * Clear the MKBP common FIFO.
+ */
+void mkbp_clear_fifo(void);
+
+/**
* Send KEY_BATTERY keystroke.
*/
#ifdef CONFIG_KEYBOARD_PROTOCOL_MKBP
@@ -26,4 +41,12 @@ void keyboard_send_battery_key(void);
static inline void keyboard_send_battery_key(void) { }
#endif
+/**
+ * Update the state of the switches.
+ *
+ * @param sw The switch that changed.
+ * @param state The state of the switch.
+ */
+void mkbp_update_switches(uint32_t sw, int state);
+
#endif /* __CROS_EC_KEYBOARD_MKBP_H */