Changeset 38832 in vbox for trunk/src/VBox/Devices/PC/BIOS-new
- Timestamp:
- Sep 22, 2011 5:51:53 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS-new/ps2mouse.c
r38699 r38832 63 63 uint8_t send_to_mouse_ctrl(uint8_t sendbyte) 64 64 { 65 BX_DEBUG_INT15_MS("send %02x to mouse:\n", sendbyte); 65 66 // wait for chance to write to ctrl 66 if ( inb(0x64) & 0x02)67 if (inb(0x64) & 0x02) 67 68 BX_PANIC(panic_msg_keyb_buffer_full,"sendmouse"); 68 69 outb(0x64, 0xD4); … … 74 75 uint8_t get_mouse_data(uint8_t __far *data) 75 76 { 77 int retries = 10000; 76 78 uint8_t response; 77 79 78 //@todo: timeout? 79 while ((inb(0x64) & 0x21) != 0x21) 80 ; 81 80 while ((inb(0x64) & 0x21) != 0x21 && retries) 81 --retries; 82 83 if (!retries) 84 return(1); 85 82 86 response = inb(0x60); 83 87 *data = response;
Note:
See TracChangeset
for help on using the changeset viewer.