diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/keyboard_scan.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/keyboard_scan.h b/include/keyboard_scan.h index 31341333c5..6ba01f9d0e 100644 --- a/include/keyboard_scan.h +++ b/include/keyboard_scan.h @@ -16,4 +16,19 @@ int keyboard_scan_init(void); /* Returns non-zero if recovery key was pressed at boot. */ int keyboard_scan_recovery_pressed(void); +/** + * Get the scan data from the keyboard. + * + * This returns the results of the last keyboard scan, by pointing the + * supplied buffer to it, and returning the number of bytes available. + * + * The supplied buffer can be used directly if required, but in that case + * the number of bytes available is limited to 'max_bytes'. + * + * @param buffp Pointer to buffer to contain data + * @param max_bytes Maximum number of bytes available in *buffp + * @return number of bytes available, or -1 for error + */ +int keyboard_get_scan(uint8_t **buffp, int max_bytes); + #endif /* __CROS_KEYBOARD_SCAN_H */ |