diff options
Diffstat (limited to 'src/mouse.h')
-rw-r--r-- | src/mouse.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mouse.h b/src/mouse.h index 561f0c7..3217736 100644 --- a/src/mouse.h +++ b/src/mouse.h @@ -6,6 +6,8 @@ #include "interrupts.h" #include "port.h" +#include "driver.h" + #define MAX_NOF_MOUSE_PACKETS 5 typedef enum { @@ -32,6 +34,7 @@ typedef struct { typedef void (*mouse_event_handler_t)( mouse_event_t *event, void *context ); typedef struct { + driver_t base; interrupt_t *interrupts; port8_t command_port; port8_t data_port; @@ -47,8 +50,14 @@ typedef struct { void *context; } mouse_t; +typedef struct { + driver_vtable_t base; +} mouse_vtable_t; + void mouse_init( mouse_t *mouse, mouse_event_handler_t handler, void *context ); -void mouse_deinit( mouse_t *mouse ); +void mouse_activate( void *obj ); +void mouse_deactivate( void *obj ); +void mouse_deinit( void *obj ); uint32_t mouse_handle_interrupt( interrupt_handler_t *handler, uint32_t esp ); |