libpayload: Add mouse cursor driver
Add a driver to handle multiple low level mouse drivers and provide basic cursor acceleration support. Tested on Lenovo T500. Change-Id: Ib7cec736631b8acf81a14d28daa29ff720777b10 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/18593 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
committed by
Stefan Reinauer
parent
8eb55bbfe7
commit
837da6ade7
@ -163,6 +163,20 @@ int keyboard_getchar(void);
|
||||
int keyboard_set_layout(char *country);
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @defgroup mouse Mouse cursor functions
|
||||
* @ingroup input
|
||||
* @{
|
||||
*/
|
||||
void mouse_cursor_poll(void);
|
||||
void mouse_cursor_get_rel(int *x, int *y, int *z);
|
||||
u32 mouse_cursor_get_buttons(void);
|
||||
void mouse_cursor_set_speed(u32 val);
|
||||
u32 mouse_cursor_get_speed(void);
|
||||
void mouse_cursor_set_acceleration(u8 val);
|
||||
u8 mouse_cursor_get_acceleration(void);
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @defgroup serial Serial functions
|
||||
* @ingroup input
|
||||
@ -304,6 +318,29 @@ int console_remove_output_driver(void *function);
|
||||
#define havechar havekey
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @defgroup mouse_cursor Mouse cursor functions
|
||||
* @{
|
||||
*/
|
||||
typedef enum {
|
||||
CURSOR_INPUT_TYPE_UNKNOWN = 0,
|
||||
CURSOR_INPUT_TYPE_USB,
|
||||
CURSOR_INPUT_TYPE_PS2,
|
||||
} cursor_input_type;
|
||||
|
||||
void mouse_cursor_init(void);
|
||||
|
||||
struct mouse_cursor_input_driver;
|
||||
struct mouse_cursor_input_driver {
|
||||
struct mouse_cursor_input_driver *next;
|
||||
/* X,Y,Z axis and buttons */
|
||||
void (*get_state)(int *, int *, int *, u32 *);
|
||||
cursor_input_type input_type;
|
||||
};
|
||||
|
||||
void mouse_cursor_add_input_driver(struct mouse_cursor_input_driver *in);
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @defgroup exec Execution functions
|
||||
|
Reference in New Issue
Block a user