2 * Copyright 2004-2010 Haiku, Inc.
3 * Distributed under the terms of the MIT License.
7 * Authors (in chronological order):
8 * Elad Lahav (elad@eldarshany.com)
9 * Stefano Ceccherini (burton666@libero.it)
10 * Axel Dörfler, axeld@pinc-software.de
11 * Marcus Overhagen <marcus@overhagen.de>
13 #ifndef __PS2_COMMON_H
14 #define __PS2_COMMON_H
19 #include <KernelExport.h>
27 # define INFO(x...) dprintf(x)
31 #define ERROR(x...) dprintf(x)
35 # define TRACE(x...) dprintf(x)
42 extern isa_module_info
*gIsa
;
44 extern device_hooks gKeyboardDeviceHooks
;
45 extern device_hooks gPointingDeviceHooks
;
47 extern bool gActiveMultiplexingEnabled
;
48 extern sem_id gControllerSem
;
55 // prototypes from common.c
56 status_t
ps2_init(void);
57 void ps2_uninit(void);
59 uint8
ps2_read_ctrl(void);
60 uint8
ps2_read_data(void);
61 void ps2_write_ctrl(uint8 ctrl
);
62 void ps2_write_data(uint8 data
);
63 status_t
ps2_wait_read(void);
64 status_t
ps2_wait_write(void);
68 extern status_t
ps2_command(uint8 cmd
, const uint8
*out
, int out_count
,
69 uint8
*in
, int in_count
);
71 // prototypes from keyboard.c & mouse.c
72 extern status_t
probe_keyboard(void);
79 #endif /* __PS2_COMMON_H */