xref: /qemu/include/hw/input/ps2.h (revision 175de52487ce0b0c78daa4cdf41a5a465a168a25)
1fd65f595SWanpeng Li /*
2fd65f595SWanpeng Li  * QEMU PS/2 keyboard/mouse emulation
3fd65f595SWanpeng Li  *
4fd65f595SWanpeng Li  * Copyright (C) 2003 Fabrice Bellard
5fd65f595SWanpeng Li  *
6fd65f595SWanpeng Li  * Permission is hereby granted, free of charge, to any person obtaining a copy
7fd65f595SWanpeng Li  * of this software and associated documentation files (the "Software"), to deal
8fd65f595SWanpeng Li  * in the Software without restriction, including without limitation the rights
9fd65f595SWanpeng Li  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10fd65f595SWanpeng Li  * copies of the Software, and to permit persons to whom the Software is
11fd65f595SWanpeng Li  * furnished to do so, subject to the following conditions:
12fd65f595SWanpeng Li  *
13fd65f595SWanpeng Li  * The above copyright notice and this permission notice shall be included in
14fd65f595SWanpeng Li  * all copies or substantial portions of the Software.
15fd65f595SWanpeng Li  *
16fd65f595SWanpeng Li  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17fd65f595SWanpeng Li  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18fd65f595SWanpeng Li  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19fd65f595SWanpeng Li  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20fd65f595SWanpeng Li  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21fd65f595SWanpeng Li  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22fd65f595SWanpeng Li  * THE SOFTWARE.
23fd65f595SWanpeng Li  */
24fd65f595SWanpeng Li 
25fd65f595SWanpeng Li #ifndef HW_PS2_H
26fd65f595SWanpeng Li #define HW_PS2_H
27fd65f595SWanpeng Li 
2887ecb68bSpbrook /* ps2.c */
2987ecb68bSpbrook void *ps2_kbd_init(void (*update_irq)(void *, int), void *update_arg);
3087ecb68bSpbrook void *ps2_mouse_init(void (*update_irq)(void *, int), void *update_arg);
3187ecb68bSpbrook void ps2_write_mouse(void *, int val);
3287ecb68bSpbrook void ps2_write_keyboard(void *, int val);
3387ecb68bSpbrook uint32_t ps2_read_data(void *);
3487ecb68bSpbrook void ps2_queue(void *, int b);
3587ecb68bSpbrook void ps2_keyboard_set_translation(void *opaque, int mode);
3687ecb68bSpbrook void ps2_mouse_fake_event(void *opaque);
37fd65f595SWanpeng Li 
38*175de524SMarkus Armbruster #endif /* HW_PS2_H */
39