VirtualBox

Changeset 59230 in vbox


Ignore:
Timestamp:
Dec 29, 2015 10:02:39 PM (9 years ago)
Author:
vboxsync
Message:

BIOS: Made timeout more predictable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS/ps2mouse.c

    r56292 r59230  
    7575uint8_t get_mouse_data(uint8_t __far *data)
    7676{
    77     int         retries = 10000;
     77    int         retries = 10000;    /* ~150ms timeout */
    7878    uint8_t     response;
    7979
    8080    while ((inb(0x64) & 0x21) != 0x21 && retries)
     81    {
     82        /* Wait until the 15us refresh counter toggles. */
     83        response = inb(0x61) & 0x10;
     84        while((inb(0x61) & 0x10) == response)
     85            ;
    8186        --retries;
     87    }
    8288
    8389    if (!retries)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette