VirtualBox

Changeset 2246 in vbox for trunk/src


Ignore:
Timestamp:
Apr 19, 2007 9:34:32 PM (18 years ago)
Author:
vboxsync
Message:

Input/pckbd.c => Input/DevPS2.cpp

Location:
trunk/src/VBox/Devices
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Input/DevPS2.cpp

    r2241 r2246  
    7070*   Internal Functions                                                         *
    7171*******************************************************************************/
     72__BEGIN_DECLS
    7273PDMBOTHCBDECL(int) kbdIOPortDataRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb);
    7374PDMBOTHCBDECL(int) kbdIOPortDataWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb);
    7475PDMBOTHCBDECL(int) kbdIOPortStatusRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb);
    7576PDMBOTHCBDECL(int) kbdIOPortCommandWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb);
    76 
     77__END_DECLS
    7778#endif /* !VBOX_DEVICE_STRUCT_TESTCASE */
    7879#endif /* VBOX */
     
    380381static void pc_kbd_put_keycode(void *opaque, int keycode)
    381382{
    382     KBDState *s = opaque;
     383    KBDState *s = (KBDState*)opaque;
    383384    kbd_queue(s, keycode, 0);
    384385}
     
    387388static uint32_t kbd_read_status(void *opaque, uint32_t addr)
    388389{
    389     KBDState *s = opaque;
     390    KBDState *s = (KBDState*)opaque;
    390391    int val;
    391392    val = s->status;
     
    404405    int rc = VINF_SUCCESS;
    405406#endif /* VBOX */
    406     KBDState *s = opaque;
     407    KBDState *s = (KBDState*)opaque;
    407408
    408409#ifdef DEBUG_KBD
     
    515516static uint32_t kbd_read_data(void *opaque, uint32_t addr)
    516517{
    517     KBDState *s = opaque;
     518    KBDState *s = (KBDState*)opaque;
    518519    KBDQueue *q;
    519520#ifdef VBOX
     
    654655        {
    655656#ifdef IN_RING3
    656             PDMKEYBLEDS enmLeds = 0
    657                                 | ((val & 0x01) ? PDMKEYBLEDS_SCROLLLOCK : 0)
    658                                 | ((val & 0x02) ? PDMKEYBLEDS_NUMLOCK    : 0)
    659                                 | ((val & 0x04) ? PDMKEYBLEDS_CAPSLOCK   : 0)
    660                                 ;
     657            PDMKEYBLEDS enmLeds = PDMKEYBLEDS_NONE;
     658            if (val & 0x01)
     659                enmLeds = (PDMKEYBLEDS)(enmLeds | PDMKEYBLEDS_SCROLLLOCK);
     660            if (val & 0x02)
     661                enmLeds = (PDMKEYBLEDS)(enmLeds | PDMKEYBLEDS_NUMLOCK);
     662            if (val & 0x04)
     663                enmLeds = (PDMKEYBLEDS)(enmLeds | PDMKEYBLEDS_CAPSLOCK);
    661664            s->Keyboard.pDrv->pfnLedStatusChange(s->Keyboard.pDrv, enmLeds);
    662665#else
     
    749752                               int dx, int dy, int dz, int buttons_state)
    750753{
    751     KBDState *s = opaque;
     754    KBDState *s = (KBDState*)opaque;
    752755
    753756    /* check if deltas are recorded when disabled */
     
    945948    int rc = VINF_SUCCESS;
    946949#endif /* VBOX */
    947     KBDState *s = opaque;
     950    KBDState *s = (KBDState*)opaque;
    948951
    949952#ifdef DEBUG_KBD
     
    10071010static void kbd_reset(void *opaque)
    10081011{
    1009     KBDState *s = opaque;
     1012    KBDState *s = (KBDState*)opaque;
    10101013    KBDQueue *q;
    10111014#ifdef VBOX
     
    12021205    if (VBOX_FAILURE(rc))
    12031206        return rc;
    1204     if (u32 != ~0)
     1207    if (u32 != ~0U)
    12051208    {
    12061209        AssertMsgFailed(("u32=%#x\n", u32));
     
    14961499            if (VBOX_SUCCESS(rc))
    14971500            {
    1498                 pData->Keyboard.pDrv = pData->Keyboard.pDrvBase->pfnQueryInterface(pData->Keyboard.pDrvBase, PDMINTERFACE_KEYBOARD_CONNECTOR);
     1501                pData->Keyboard.pDrv = (PDMIKEYBOARDCONNECTOR*)(pData->Keyboard.pDrvBase->pfnQueryInterface(pData->Keyboard.pDrvBase, PDMINTERFACE_KEYBOARD_CONNECTOR));
    14991502                if (!pData->Keyboard.pDrv)
    15001503                {
     
    15171520            if (VBOX_SUCCESS(rc))
    15181521            {
    1519                 pData->Mouse.pDrv = pData->Mouse.pDrvBase->pfnQueryInterface(pData->Mouse.pDrvBase, PDMINTERFACE_MOUSE_CONNECTOR);
     1522                pData->Mouse.pDrv = (PDMIMOUSECONNECTOR*)(pData->Mouse.pDrvBase->pfnQueryInterface(pData->Mouse.pDrvBase, PDMINTERFACE_MOUSE_CONNECTOR));
    15201523                if (!pData->Mouse.pDrv)
    15211524                {
  • trunk/src/VBox/Devices/Makefile

    r2084 r2246  
    170170        $(PATH_CURRENT)
    171171DevicesR3_SOURCES       = \
    172         Input/pckbd.c \
     172        Input/DevPS2.cpp \
    173173        Bus/DevPCI.cpp \
    174174        Graphics/DevVGA.cpp \
     
    221221        Bus/DevPCI.cpp \
    222222        Graphics/DevVGA.cpp \
    223         Input/pckbd.c \
     223        Input/DevPS2.cpp \
    224224        PC/DevACPI.cpp \
    225225        PC/DevPit-i8254.cpp \
     
    257257        Bus/DevPCI.cpp \
    258258        Graphics/DevVGA.cpp \
    259         Input/pckbd.c \
     259        Input/DevPS2.cpp \
    260260        PC/DevACPI.cpp \
    261261        PC/DevPit-i8254.cpp \
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSize.cpp

    r1931 r2246  
    3434#include "Graphics/DevVGA.cpp"
    3535#undef LOG_GROUP
    36 #include "Input/pckbd.c"
     36#include "Input/DevPS2.cpp"
    3737#undef LOG_GROUP
    3838#include "Network/DevPCNet.cpp"
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSizeGC.cpp

    r2106 r2246  
    4444#include "Graphics/DevVGA.cpp"
    4545#undef LOG_GROUP
    46 #include "Input/pckbd.c"
     46#include "Input/DevPS2.cpp"
    4747#undef LOG_GROUP
    4848#include "Network/DevPCNet.cpp"
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