- Timestamp:
- Apr 19, 2007 9:34:32 PM (18 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Input/DevPS2.cpp
r2241 r2246 70 70 * Internal Functions * 71 71 *******************************************************************************/ 72 __BEGIN_DECLS 72 73 PDMBOTHCBDECL(int) kbdIOPortDataRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb); 73 74 PDMBOTHCBDECL(int) kbdIOPortDataWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb); 74 75 PDMBOTHCBDECL(int) kbdIOPortStatusRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb); 75 76 PDMBOTHCBDECL(int) kbdIOPortCommandWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb); 76 77 __END_DECLS 77 78 #endif /* !VBOX_DEVICE_STRUCT_TESTCASE */ 78 79 #endif /* VBOX */ … … 380 381 static void pc_kbd_put_keycode(void *opaque, int keycode) 381 382 { 382 KBDState *s = opaque;383 KBDState *s = (KBDState*)opaque; 383 384 kbd_queue(s, keycode, 0); 384 385 } … … 387 388 static uint32_t kbd_read_status(void *opaque, uint32_t addr) 388 389 { 389 KBDState *s = opaque;390 KBDState *s = (KBDState*)opaque; 390 391 int val; 391 392 val = s->status; … … 404 405 int rc = VINF_SUCCESS; 405 406 #endif /* VBOX */ 406 KBDState *s = opaque;407 KBDState *s = (KBDState*)opaque; 407 408 408 409 #ifdef DEBUG_KBD … … 515 516 static uint32_t kbd_read_data(void *opaque, uint32_t addr) 516 517 { 517 KBDState *s = opaque;518 KBDState *s = (KBDState*)opaque; 518 519 KBDQueue *q; 519 520 #ifdef VBOX … … 654 655 { 655 656 #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); 661 664 s->Keyboard.pDrv->pfnLedStatusChange(s->Keyboard.pDrv, enmLeds); 662 665 #else … … 749 752 int dx, int dy, int dz, int buttons_state) 750 753 { 751 KBDState *s = opaque;754 KBDState *s = (KBDState*)opaque; 752 755 753 756 /* check if deltas are recorded when disabled */ … … 945 948 int rc = VINF_SUCCESS; 946 949 #endif /* VBOX */ 947 KBDState *s = opaque;950 KBDState *s = (KBDState*)opaque; 948 951 949 952 #ifdef DEBUG_KBD … … 1007 1010 static void kbd_reset(void *opaque) 1008 1011 { 1009 KBDState *s = opaque;1012 KBDState *s = (KBDState*)opaque; 1010 1013 KBDQueue *q; 1011 1014 #ifdef VBOX … … 1202 1205 if (VBOX_FAILURE(rc)) 1203 1206 return rc; 1204 if (u32 != ~0 )1207 if (u32 != ~0U) 1205 1208 { 1206 1209 AssertMsgFailed(("u32=%#x\n", u32)); … … 1496 1499 if (VBOX_SUCCESS(rc)) 1497 1500 { 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)); 1499 1502 if (!pData->Keyboard.pDrv) 1500 1503 { … … 1517 1520 if (VBOX_SUCCESS(rc)) 1518 1521 { 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)); 1520 1523 if (!pData->Mouse.pDrv) 1521 1524 { -
trunk/src/VBox/Devices/Makefile
r2084 r2246 170 170 $(PATH_CURRENT) 171 171 DevicesR3_SOURCES = \ 172 Input/ pckbd.c\172 Input/DevPS2.cpp \ 173 173 Bus/DevPCI.cpp \ 174 174 Graphics/DevVGA.cpp \ … … 221 221 Bus/DevPCI.cpp \ 222 222 Graphics/DevVGA.cpp \ 223 Input/ pckbd.c\223 Input/DevPS2.cpp \ 224 224 PC/DevACPI.cpp \ 225 225 PC/DevPit-i8254.cpp \ … … 257 257 Bus/DevPCI.cpp \ 258 258 Graphics/DevVGA.cpp \ 259 Input/ pckbd.c\259 Input/DevPS2.cpp \ 260 260 PC/DevACPI.cpp \ 261 261 PC/DevPit-i8254.cpp \ -
trunk/src/VBox/Devices/testcase/tstDeviceStructSize.cpp
r1931 r2246 34 34 #include "Graphics/DevVGA.cpp" 35 35 #undef LOG_GROUP 36 #include "Input/ pckbd.c"36 #include "Input/DevPS2.cpp" 37 37 #undef LOG_GROUP 38 38 #include "Network/DevPCNet.cpp" -
trunk/src/VBox/Devices/testcase/tstDeviceStructSizeGC.cpp
r2106 r2246 44 44 #include "Graphics/DevVGA.cpp" 45 45 #undef LOG_GROUP 46 #include "Input/ pckbd.c"46 #include "Input/DevPS2.cpp" 47 47 #undef LOG_GROUP 48 48 #include "Network/DevPCNet.cpp"
Note:
See TracChangeset
for help on using the changeset viewer.