Changeset 7943c43 in mainline for uspace/srv/hid/input
- Timestamp:
- 2012-01-16T22:45:38Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 32817cc, 3fe58d3c
- Parents:
- 9117ef9b (diff), 3ea725e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace/srv/hid/input
- Files:
-
- 2 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/Makefile
r9117ef9b r7943c43 43 43 port/adb_mouse.c \ 44 44 port/chardev.c \ 45 port/chardev_mouse.c \46 45 port/gxemul.c \ 47 46 port/msim.c \ … … 52 51 proto/adb.c \ 53 52 proto/mousedev.c \ 54 proto/ps2.c \55 53 ctl/apple.c \ 56 54 ctl/gxe_fb.c \ -
uspace/srv/hid/input/generic/input.c
r9117ef9b r7943c43 172 172 173 173 /** Mouse pointer has moved. */ 174 void mouse_push_event_move(mouse_dev_t *mdev, int dx, int dy )174 void mouse_push_event_move(mouse_dev_t *mdev, int dx, int dy, int dz) 175 175 { 176 176 async_exch_t *exch = async_exchange_begin(client_sess); 177 async_msg_2(exch, INPUT_EVENT_MOVE, dx, dy); 177 if (dx || dy) 178 async_msg_2(exch, INPUT_EVENT_MOVE, dx, dy); 179 if (dz) { 180 // TODO: Implement proper wheel support 181 keycode_t code = dz > 0 ? KC_UP : KC_DOWN; 182 for (int i = 0; i < 3; ++i) { 183 async_msg_4(exch, INPUT_EVENT_KEY, KEY_PRESS, code, 0, 0); 184 } 185 async_msg_4(exch, INPUT_EVENT_KEY, KEY_RELEASE, code, 0, 0); 186 } 178 187 async_exchange_end(exch); 179 188 } … … 397 406 * them automatically. 398 407 */ 399 #if defined(UARCH_amd64)400 kbd_add_dev(&chardev_port, &pc_ctl);401 #endif402 408 #if defined(UARCH_arm32) && defined(MACHINE_gta02) 403 409 kbd_add_dev(&chardev_port, &stty_ctl); … … 411 417 #if defined(UARCH_arm32) && defined(MACHINE_integratorcp) 412 418 kbd_add_dev(&pl050_port, &pc_ctl); 413 #endif414 #if defined(UARCH_ia32)415 kbd_add_dev(&chardev_port, &pc_ctl);416 #endif417 #if defined(MACHINE_i460GX)418 kbd_add_dev(&chardev_port, &pc_ctl);419 419 #endif 420 420 #if defined(MACHINE_ski) … … 450 450 * them automatically. 451 451 */ 452 #if defined(UARCH_amd64)453 mouse_add_dev(&chardev_mouse_port, &ps2_proto);454 #endif455 #if defined(UARCH_ia32)456 mouse_add_dev(&chardev_mouse_port, &ps2_proto);457 #endif458 #if defined(MACHINE_i460GX)459 mouse_add_dev(&chardev_mouse_port, &ps2_proto);460 #endif461 452 #if defined(UARCH_ppc32) 462 453 mouse_add_dev(&adb_mouse_port, &adb_proto); … … 658 649 659 650 /* Register driver */ 660 int rc = loc_server_register(NAME, client_connection); 651 async_set_client_connection(client_connection); 652 int rc = loc_server_register(NAME); 661 653 if (rc < 0) { 662 654 printf("%s: Unable to register server (%d)\n", NAME, rc); -
uspace/srv/hid/input/include/mouse.h
r9117ef9b r7943c43 62 62 63 63 extern void mouse_push_data(mouse_dev_t *, sysarg_t); 64 extern void mouse_push_event_move(mouse_dev_t *, int, int );64 extern void mouse_push_event_move(mouse_dev_t *, int, int, int); 65 65 extern void mouse_push_event_button(mouse_dev_t *, int, int); 66 66 -
uspace/srv/hid/input/include/mouse_proto.h
r9117ef9b r7943c43 48 48 49 49 extern mouse_proto_ops_t adb_proto; 50 extern mouse_proto_ops_t ps2_proto;51 50 extern mouse_proto_ops_t mousedev_proto; 52 51 -
uspace/srv/hid/input/port/chardev.c
r9117ef9b r7943c43 63 63 /** List of devices to try connecting to. */ 64 64 static const char *in_devs[] = { 65 "char/ps2a",66 65 "char/s3c24ser" 67 66 }; -
uspace/srv/hid/input/port/gxemul.c
r9117ef9b r7943c43 90 90 async_set_interrupt_received(gxemul_irq_handler); 91 91 gxemul_cmds[0].addr = (void *) addr; 92 register_irq(inr, device_assign_devno(), 0, &gxemul_kbd);92 irq_register(inr, device_assign_devno(), 0, &gxemul_kbd); 93 93 return 0; 94 94 } -
uspace/srv/hid/input/port/msim.c
r9117ef9b r7943c43 89 89 msim_cmds[0].addr = (void *) vaddr; 90 90 async_set_interrupt_received(msim_irq_handler); 91 register_irq(inr, device_assign_devno(), 0, &msim_kbd);91 irq_register(inr, device_assign_devno(), 0, &msim_kbd); 92 92 93 93 return 0; -
uspace/srv/hid/input/port/niagara.c
r9117ef9b r7943c43 63 63 #define POLL_INTERVAL 10000 64 64 65 /**66 * Virtual address mapped to the buffer shared with the kernel counterpart.67 */68 static uintptr_t input_buffer_addr;69 70 65 /* 71 66 * Kernel counterpart of the driver pushes characters (it has read) here. … … 102 97 return -1; 103 98 104 input_buffer_addr = (uintptr_t) as_get_mappable_page(PAGE_SIZE); 105 int rc = physmem_map((void *) paddr, (void *) input_buffer_addr, 106 1, AS_AREA_READ | AS_AREA_WRITE); 107 99 int rc = physmem_map((void *) paddr, 1, 100 AS_AREA_READ | AS_AREA_WRITE, (void *) &input_buffer); 108 101 if (rc != 0) { 109 102 printf("Niagara: uspace driver couldn't map physical memory: %d\n", … … 111 104 return rc; 112 105 } 113 114 input_buffer = (input_buffer_t) input_buffer_addr;115 106 116 107 thread_id_t tid; -
uspace/srv/hid/input/port/ns16550.c
r9117ef9b r7943c43 135 135 136 136 async_set_interrupt_received(ns16550_irq_handler); 137 register_irq(inr, device_assign_devno(), inr, &ns16550_kbd);137 irq_register(inr, device_assign_devno(), inr, &ns16550_kbd); 138 138 139 139 return pio_enable((void *) ns16550_physical, 8, &vaddr); -
uspace/srv/hid/input/port/pl050.c
r9117ef9b r7943c43 117 117 118 118 async_set_interrupt_received(pl050_irq_handler); 119 register_irq(inr, device_assign_devno(), 0, &pl050_kbd);119 irq_register(inr, device_assign_devno(), 0, &pl050_kbd); 120 120 121 121 return 0; -
uspace/srv/hid/input/proto/adb.c
r9117ef9b r7943c43 82 82 83 83 if (dx != 0 || dy != 0) 84 mouse_push_event_move(mouse_dev, dx, dy );84 mouse_push_event_move(mouse_dev, dx, dy, 0); 85 85 } 86 86 -
uspace/srv/hid/input/proto/mousedev.c
r9117ef9b r7943c43 91 91 switch (IPC_GET_IMETHOD(call)) { 92 92 case MOUSEEV_MOVE_EVENT: 93 mouse_push_event_move(mousedev->mouse_dev, IPC_GET_ARG1(call), 94 IPC_GET_ARG2(call)); 93 mouse_push_event_move(mousedev->mouse_dev, 94 IPC_GET_ARG1(call), IPC_GET_ARG2(call), 95 IPC_GET_ARG3(call)); 95 96 retval = EOK; 96 97 break; 97 98 case MOUSEEV_BUTTON_EVENT: 98 mouse_push_event_button(mousedev->mouse_dev, IPC_GET_ARG1(call),99 IPC_GET_ARG 2(call));99 mouse_push_event_button(mousedev->mouse_dev, 100 IPC_GET_ARG1(call), IPC_GET_ARG2(call)); 100 101 retval = EOK; 101 102 break;
Note:
See TracChangeset
for help on using the changeset viewer.