Changeset f991b6b in mainline for uspace/srv


Ignore:
Timestamp:
2012-01-14T09:53:41Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6d8455d
Parents:
0a549cc (diff), d5c60a2 (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.
Message:

Merge i8042kbd/mouse DDF drivers.

Location:
uspace/srv
Files:
3 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/Makefile

    r0a549cc rf991b6b  
    4343        port/adb_mouse.c \
    4444        port/chardev.c \
    45         port/chardev_mouse.c \
    4645        port/gxemul.c \
    4746        port/msim.c \
     
    5251        proto/adb.c \
    5352        proto/mousedev.c \
    54         proto/ps2.c \
    5553        ctl/apple.c \
    5654        ctl/gxe_fb.c \
  • uspace/srv/hid/input/generic/input.c

    r0a549cc rf991b6b  
    172172
    173173/** Mouse pointer has moved. */
    174 void mouse_push_event_move(mouse_dev_t *mdev, int dx, int dy)
     174void mouse_push_event_move(mouse_dev_t *mdev, int dx, int dy, int dz)
    175175{
    176176        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        }
    178187        async_exchange_end(exch);
    179188}
     
    397406         * them automatically.
    398407         */
    399 #if defined(UARCH_amd64)
    400         kbd_add_dev(&chardev_port, &pc_ctl);
    401 #endif
    402408#if defined(UARCH_arm32) && defined(MACHINE_gta02)
    403409        kbd_add_dev(&chardev_port, &stty_ctl);
     
    411417#if defined(UARCH_arm32) && defined(MACHINE_integratorcp)
    412418        kbd_add_dev(&pl050_port, &pc_ctl);
    413 #endif
    414 #if defined(UARCH_ia32)
    415         kbd_add_dev(&chardev_port, &pc_ctl);
    416 #endif
    417 #if defined(MACHINE_i460GX)
    418         kbd_add_dev(&chardev_port, &pc_ctl);
    419419#endif
    420420#if defined(MACHINE_ski)
     
    450450         * them automatically.
    451451         */
    452 #if defined(UARCH_amd64)
    453         mouse_add_dev(&chardev_mouse_port, &ps2_proto);
    454 #endif
    455 #if defined(UARCH_ia32)
    456         mouse_add_dev(&chardev_mouse_port, &ps2_proto);
    457 #endif
    458 #if defined(MACHINE_i460GX)
    459         mouse_add_dev(&chardev_mouse_port, &ps2_proto);
    460 #endif
    461452#if defined(UARCH_ppc32)
    462453        mouse_add_dev(&adb_mouse_port, &adb_proto);
  • uspace/srv/hid/input/include/mouse.h

    r0a549cc rf991b6b  
    6262
    6363extern void mouse_push_data(mouse_dev_t *, sysarg_t);
    64 extern void mouse_push_event_move(mouse_dev_t *, int, int);
     64extern void mouse_push_event_move(mouse_dev_t *, int, int, int);
    6565extern void mouse_push_event_button(mouse_dev_t *, int, int);
    6666
  • uspace/srv/hid/input/include/mouse_proto.h

    r0a549cc rf991b6b  
    4848
    4949extern mouse_proto_ops_t adb_proto;
    50 extern mouse_proto_ops_t ps2_proto;
    5150extern mouse_proto_ops_t mousedev_proto;
    5251
  • uspace/srv/hid/input/port/chardev.c

    r0a549cc rf991b6b  
    6363/** List of devices to try connecting to. */
    6464static const char *in_devs[] = {
    65         "char/ps2a",
    6665        "char/s3c24ser"
    6766};
  • uspace/srv/hid/input/proto/adb.c

    r0a549cc rf991b6b  
    8282       
    8383        if (dx != 0 || dy != 0)
    84                 mouse_push_event_move(mouse_dev, dx, dy);
     84                mouse_push_event_move(mouse_dev, dx, dy, 0);
    8585}
    8686
  • uspace/srv/hid/input/proto/mousedev.c

    r0a549cc rf991b6b  
    9191                switch (IPC_GET_IMETHOD(call)) {
    9292                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));
    9596                        retval = EOK;
    9697                        break;
    9798                case MOUSEEV_BUTTON_EVENT:
    98                         mouse_push_event_button(mousedev->mouse_dev, IPC_GET_ARG1(call),
    99                             IPC_GET_ARG2(call));
     99                        mouse_push_event_button(mousedev->mouse_dev,
     100                            IPC_GET_ARG1(call), IPC_GET_ARG2(call));
    100101                        retval = EOK;
    101102                        break;
Note: See TracChangeset for help on using the changeset viewer.