Changeset 7cfe5c0 in mainline for uspace/srv/hid/input
- Timestamp:
- 2012-08-20T19:16:24Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6b99156
- Parents:
- b9cb911 (diff), 01e397ac (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:
-
- 21 edited
- 14 moved
-
Makefile (modified) (2 diffs)
-
ctl/apple.c (modified) (1 diff)
-
ctl/gxe_fb.c (modified) (1 diff)
-
ctl/kbdev.c (modified) (1 diff)
-
ctl/pc.c (modified) (1 diff)
-
ctl/stty.c (modified) (1 diff)
-
ctl/sun.c (modified) (1 diff)
-
gsp.c (moved) (moved from uspace/srv/hid/input/generic/gsp.c ) (2 diffs)
-
gsp.h (moved) (moved from uspace/srv/hid/input/include/gsp.h )
-
input.c (moved) (moved from uspace/srv/hid/input/generic/input.c ) (5 diffs)
-
input.h (moved) (moved from uspace/srv/hid/input/include/input.h ) (1 diff)
-
kbd.h (moved) (moved from uspace/srv/hid/input/include/kbd.h )
-
kbd_ctl.h (moved) (moved from uspace/srv/hid/input/include/kbd_ctl.h ) (1 diff)
-
kbd_port.h (moved) (moved from uspace/srv/hid/input/include/kbd_port.h )
-
layout.c (moved) (moved from uspace/srv/hid/input/generic/layout.c ) (1 diff)
-
layout.h (moved) (moved from uspace/srv/hid/input/include/layout.h )
-
layout/cz.c (modified) (1 diff)
-
layout/us_dvorak.c (modified) (1 diff)
-
layout/us_qwerty.c (modified) (1 diff)
-
mouse.h (moved) (moved from uspace/srv/hid/input/include/mouse.h ) (1 diff)
-
mouse_port.h (moved) (moved from uspace/srv/hid/input/include/mouse_port.h )
-
mouse_proto.h (moved) (moved from uspace/srv/hid/input/include/mouse_proto.h ) (1 diff)
-
port/adb.c (modified) (1 diff)
-
port/adb_mouse.c (modified) (1 diff)
-
port/chardev.c (modified) (1 diff)
-
port/gxemul.c (modified) (1 diff)
-
port/msim.c (modified) (1 diff)
-
port/niagara.c (modified) (3 diffs)
-
port/ns16550.c (modified) (1 diff)
-
port/pl050.c (modified) (1 diff)
-
port/ski.c (modified) (1 diff)
-
proto/adb.c (modified) (1 diff)
-
proto/mousedev.c (modified) (2 diffs)
-
stroke.c (moved) (moved from uspace/srv/hid/input/generic/stroke.c ) (1 diff)
-
stroke.h (moved) (moved from uspace/srv/hid/input/include/stroke.h ) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/Makefile
rb9cb911 r7cfe5c0 29 29 30 30 USPACE_PREFIX = ../../.. 31 EXTRA_CFLAGS = -Iinclude32 31 BINARY = input 33 32 34 33 SOURCES = \ 35 generic/gsp.c \36 generic/input.c \37 generic/layout.c \38 generic/stroke.c \39 34 layout/cz.c \ 40 35 layout/us_qwerty.c \ … … 56 51 ctl/pc.c \ 57 52 ctl/stty.c \ 58 ctl/sun.c 53 ctl/sun.c \ 54 gsp.c \ 55 input.c \ 56 layout.c \ 57 stroke.c 59 58 60 59 include $(USPACE_PREFIX)/Makefile.common -
uspace/srv/hid/input/ctl/apple.c
rb9cb911 r7cfe5c0 36 36 */ 37 37 38 #include <kbd.h>39 38 #include <io/console.h> 40 39 #include <io/keycode.h> 41 #include <kbd_ctl.h> 42 #include <kbd_port.h> 40 #include "../kbd.h" 41 #include "../kbd_ctl.h" 42 #include "../kbd_port.h" 43 43 44 44 static void apple_ctl_parse(sysarg_t); -
uspace/srv/hid/input/ctl/gxe_fb.c
rb9cb911 r7cfe5c0 33 33 /** 34 34 * @file 35 * @brief GXEmul framebuffer-mode keyboard controller driver.35 * @brief GXEmul framebuffer-mode keyboard controller driver. 36 36 */ 37 37 38 #include <kbd.h>39 38 #include <io/console.h> 40 39 #include <io/keycode.h> 41 #include <kbd_ctl.h> 42 #include <kbd_port.h> 43 #include <gsp.h> 44 #include <stroke.h> 40 #include "../stroke.h" 41 #include "../gsp.h" 42 #include "../kbd.h" 43 #include "../kbd_port.h" 44 #include "../kbd_ctl.h" 45 45 46 46 static void gxe_fb_ctl_parse(sysarg_t); -
uspace/srv/hid/input/ctl/kbdev.c
rb9cb911 r7cfe5c0 40 40 #include <errno.h> 41 41 #include <fcntl.h> 42 #include <gsp.h>43 42 #include <io/console.h> 44 43 #include <io/keycode.h> 45 44 #include <ipc/kbdev.h> 46 #include <input.h>47 #include <kbd.h>48 #include <kbd_ctl.h>49 #include <kbd_port.h>50 45 #include <loc.h> 51 46 #include <stdlib.h> 52 47 #include <vfs/vfs_sess.h> 53 48 #include <sys/typefmt.h> 49 #include "../gsp.h" 50 #include "../input.h" 51 #include "../kbd.h" 52 #include "../kbd_ctl.h" 53 #include "../kbd_port.h" 54 54 55 55 static int kbdev_ctl_init(kbd_dev_t *); -
uspace/srv/hid/input/ctl/pc.c
rb9cb911 r7cfe5c0 36 36 */ 37 37 38 #include <kbd.h>39 38 #include <io/console.h> 40 39 #include <io/keycode.h> 41 #include <kbd_ctl.h> 42 #include <kbd_port.h> 43 #include <gsp.h> 40 #include "../gsp.h" 41 #include "../kbd.h" 42 #include "../kbd_port.h" 43 #include "../kbd_ctl.h" 44 44 45 45 static void pc_ctl_parse(sysarg_t); -
uspace/srv/hid/input/ctl/stty.c
rb9cb911 r7cfe5c0 38 38 */ 39 39 40 #include <kbd.h>41 40 #include <io/keycode.h> 42 #include <kbd_ctl.h> 43 #include <kbd_port.h> 44 #include <gsp.h> 45 #include <stroke.h> 41 #include "../stroke.h" 42 #include "../gsp.h" 43 #include "../kbd.h" 44 #include "../kbd_port.h" 45 #include "../kbd_ctl.h" 46 46 47 47 static void stty_ctl_parse(sysarg_t); -
uspace/srv/hid/input/ctl/sun.c
rb9cb911 r7cfe5c0 37 37 */ 38 38 39 #include <kbd.h>40 39 #include <io/console.h> 41 40 #include <io/keycode.h> 42 #include <kbd_ctl.h> 43 #include <kbd_port.h> 41 #include "../kbd.h" 42 #include "../kbd_port.h" 43 #include "../kbd_ctl.h" 44 44 45 45 static void sun_ctl_parse(sysarg_t); -
uspace/srv/hid/input/gsp.c
rb9cb911 r7cfe5c0 31 31 * @ingroup input 32 32 * @{ 33 */ 33 */ 34 34 /** @file 35 * @brief Generic scancode parser.35 * @brief Generic scancode parser. 36 36 * 37 37 * The scancode parser is a simple finite state machine. It is described … … 49 49 */ 50 50 51 #include <gsp.h>52 51 #include <adt/hash_table.h> 53 52 #include <adt/hash.h> 54 53 #include <stdlib.h> 55 54 #include <stdio.h> 55 #include "gsp.h" 56 56 57 57 /* -
uspace/srv/hid/input/input.c
rb9cb911 r7cfe5c0 54 54 #include <io/keycode.h> 55 55 #include <loc.h> 56 #include <input.h>57 #include <kbd.h>58 #include <kbd_port.h>59 #include <kbd_ctl.h>60 #include <mouse_proto.h>61 #include <layout.h>62 #include <mouse.h>56 #include "layout.h" 57 #include "kbd.h" 58 #include "kbd_port.h" 59 #include "kbd_ctl.h" 60 #include "mouse.h" 61 #include "mouse_proto.h" 62 #include "input.h" 63 63 64 64 #define NUM_LAYOUTS 3 … … 189 189 } 190 190 async_exchange_end(exch); 191 } 192 193 /** Mouse pointer has moved in absolute mode. */ 194 void mouse_push_event_abs_move(mouse_dev_t *mdev, unsigned int x, unsigned int y, 195 unsigned int max_x, unsigned int max_y) 196 { 197 if (max_x && max_y) { 198 async_exch_t *exch = async_exchange_begin(client_sess); 199 async_msg_4(exch, INPUT_EVENT_ABS_MOVE, x, y, max_x, max_y); 200 async_exchange_end(exch); 201 } 191 202 } 192 203 … … 635 646 } 636 647 648 static void usage(char *name) 649 { 650 printf("Usage: %s <service_name>\n", name); 651 } 652 637 653 int main(int argc, char **argv) 638 654 { 655 if (argc < 2) { 656 usage(argv[0]); 657 return 1; 658 } 659 639 660 printf("%s: HelenOS input service\n", NAME); 640 661 … … 667 688 } 668 689 669 char kbd[LOC_NAME_MAXLEN + 1];670 snprintf(kbd, LOC_NAME_MAXLEN, "%s/%s", NAMESPACE, NAME);671 672 690 service_id_t service_id; 673 rc = loc_service_register( kbd, &service_id);674 if (rc != EOK) { 675 printf("%s: Unable to register service %s\n", NAME, kbd);691 rc = loc_service_register(argv[1], &service_id); 692 if (rc != EOK) { 693 printf("%s: Unable to register service %s\n", NAME, argv[1]); 676 694 return rc; 677 695 } … … 681 699 682 700 printf("%s: Accepting connections\n", NAME); 701 task_retval(0); 683 702 async_manager(); 684 703 -
uspace/srv/hid/input/input.h
rb9cb911 r7cfe5c0 42 42 #include <async.h> 43 43 44 #define NAME "input" 45 #define NAMESPACE "hid" 44 #define NAME "input" 46 45 47 46 extern bool irc_service; -
uspace/srv/hid/input/kbd_ctl.h
rb9cb911 r7cfe5c0 38 38 #define KBD_CTL_H_ 39 39 40 #include <kbd_port.h>40 #include "kbd_port.h" 41 41 42 42 struct kbd_dev; -
uspace/srv/hid/input/layout.c
rb9cb911 r7cfe5c0 37 37 38 38 #include <errno.h> 39 #include <input.h>40 #include <layout.h>41 39 #include <stdlib.h> 40 #include "input.h" 41 #include "layout.h" 42 42 43 43 /** Create a new layout instance. */ -
uspace/srv/hid/input/layout/cz.c
rb9cb911 r7cfe5c0 33 33 34 34 #include <errno.h> 35 #include <input.h>36 35 #include <io/console.h> 37 36 #include <io/keycode.h> 38 37 #include <bool.h> 39 #include <layout.h>40 38 #include <stdlib.h> 39 #include "../input.h" 40 #include "../layout.h" 41 41 42 42 static int cz_create(layout_t *); -
uspace/srv/hid/input/layout/us_dvorak.c
rb9cb911 r7cfe5c0 33 33 34 34 #include <errno.h> 35 #include <kbd.h>36 35 #include <io/console.h> 37 36 #include <io/keycode.h> 38 #include <layout.h> 37 #include "../layout.h" 38 #include "../kbd.h" 39 39 40 40 static int us_dvorak_create(layout_t *); -
uspace/srv/hid/input/layout/us_qwerty.c
rb9cb911 r7cfe5c0 28 28 29 29 /** @addtogroup input 30 * @brief US QWERTY layout.30 * @brief US QWERTY layout. 31 31 * @{ 32 32 */ 33 33 34 34 #include <errno.h> 35 #include <kbd.h>36 35 #include <io/console.h> 37 36 #include <io/keycode.h> 38 #include <layout.h> 37 #include "../layout.h" 38 #include "../kbd.h" 39 39 40 40 static int us_qwerty_create(layout_t *); -
uspace/srv/hid/input/mouse.h
rb9cb911 r7cfe5c0 63 63 extern void mouse_push_data(mouse_dev_t *, sysarg_t); 64 64 extern void mouse_push_event_move(mouse_dev_t *, int, int, int); 65 extern void mouse_push_event_abs_move(mouse_dev_t *, unsigned int, unsigned int, 66 unsigned int, unsigned int); 65 67 extern void mouse_push_event_button(mouse_dev_t *, int, int); 66 68 -
uspace/srv/hid/input/mouse_proto.h
rb9cb911 r7cfe5c0 38 38 #define MOUSE_PROTO_H_ 39 39 40 #include <mouse_port.h>40 #include "mouse_port.h" 41 41 42 42 struct mouse_dev; -
uspace/srv/hid/input/port/adb.c
rb9cb911 r7cfe5c0 37 37 #include <ipc/adb.h> 38 38 #include <async.h> 39 #include <input.h>40 #include <kbd_port.h>41 #include <kbd.h>42 39 #include <vfs/vfs.h> 43 40 #include <fcntl.h> 44 41 #include <errno.h> 45 42 #include <loc.h> 43 #include "../input.h" 44 #include "../kbd_port.h" 45 #include "../kbd.h" 46 46 47 47 static void kbd_port_events(ipc_callid_t iid, ipc_call_t *icall, void *arg); -
uspace/srv/hid/input/port/adb_mouse.c
rb9cb911 r7cfe5c0 37 37 #include <ipc/adb.h> 38 38 #include <async.h> 39 #include <input.h>40 #include <mouse_port.h>41 #include <mouse.h>42 39 #include <errno.h> 43 40 #include <loc.h> 44 41 #include <stdio.h> 42 #include "../mouse.h" 43 #include "../mouse_port.h" 44 #include "../input.h" 45 45 46 46 static mouse_dev_t *mouse_dev; -
uspace/srv/hid/input/port/chardev.c
rb9cb911 r7cfe5c0 37 37 #include <ipc/char.h> 38 38 #include <async.h> 39 #include <input.h>40 #include <kbd_port.h>41 #include <kbd.h>42 39 #include <loc.h> 43 40 #include <errno.h> 44 41 #include <stdio.h> 42 #include "../input.h" 43 #include "../kbd_port.h" 44 #include "../kbd.h" 45 45 46 46 static void kbd_port_events(ipc_callid_t iid, ipc_call_t *icall, void *arg); -
uspace/srv/hid/input/port/gxemul.c
rb9cb911 r7cfe5c0 31 31 * @{ 32 32 * @ingroup kbd 33 */ 33 */ 34 34 /** @file 35 * @brief GXEmul keyboard port driver.35 * @brief GXEmul keyboard port driver. 36 36 */ 37 37 38 38 #include <async.h> 39 39 #include <sysinfo.h> 40 #include <kbd_port.h>41 #include <kbd.h>42 40 #include <ddi.h> 43 41 #include <errno.h> 42 #include "../kbd_port.h" 43 #include "../kbd.h" 44 44 45 45 static int gxemul_port_init(kbd_dev_t *); -
uspace/srv/hid/input/port/msim.c
rb9cb911 r7cfe5c0 38 38 #include <async.h> 39 39 #include <sysinfo.h> 40 #include <kbd_port.h>41 #include <kbd.h>42 40 #include <ddi.h> 43 41 #include <errno.h> 42 #include "../kbd_port.h" 43 #include "../kbd.h" 44 44 45 45 static int msim_port_init(kbd_dev_t *); -
uspace/srv/hid/input/port/niagara.c
rb9cb911 r7cfe5c0 31 31 * @ingroup kbd 32 32 * @{ 33 */ 33 */ 34 34 /** @file 35 * @brief Niagara console keyboard port driver.35 * @brief Niagara console keyboard port driver. 36 36 */ 37 37 … … 39 39 #include <ddi.h> 40 40 #include <async.h> 41 #include <kbd.h>42 #include <kbd_port.h>43 41 #include <sysinfo.h> 44 42 #include <stdio.h> … … 46 44 #include <bool.h> 47 45 #include <errno.h> 46 #include "../kbd_port.h" 47 #include "../kbd.h" 48 48 49 49 static int niagara_port_init(kbd_dev_t *); -
uspace/srv/hid/input/port/ns16550.c
rb9cb911 r7cfe5c0 39 39 #include <async.h> 40 40 #include <sysinfo.h> 41 #include <input.h>42 #include <kbd.h>43 #include <kbd_port.h>44 41 #include <ddi.h> 45 42 #include <errno.h> 43 #include "../input.h" 44 #include "../kbd_port.h" 45 #include "../kbd.h" 46 46 47 47 static int ns16550_port_init(kbd_dev_t *); -
uspace/srv/hid/input/port/pl050.c
rb9cb911 r7cfe5c0 41 41 #include <unistd.h> 42 42 #include <sysinfo.h> 43 #include <kbd_port.h>44 #include <kbd.h>45 43 #include <ddi.h> 46 44 #include <stdio.h> 47 45 #include <errno.h> 46 #include "../kbd_port.h" 47 #include "../kbd.h" 48 48 49 49 static int pl050_port_init(kbd_dev_t *); -
uspace/srv/hid/input/port/ski.c
rb9cb911 r7cfe5c0 31 31 * @ingroup kbd 32 32 * @{ 33 */ 33 */ 34 34 /** @file 35 * @brief Ski console keyboard port driver.35 * @brief Ski console keyboard port driver. 36 36 */ 37 38 37 39 38 #include <stdlib.h> 40 39 #include <unistd.h> 41 #include <kbd.h>42 #include <kbd_port.h>43 40 #include <sys/types.h> 44 41 #include <thread.h> 45 42 #include <bool.h> 43 #include "../kbd_port.h" 44 #include "../kbd.h" 46 45 47 46 static int ski_port_init(kbd_dev_t *); -
uspace/srv/hid/input/proto/adb.c
rb9cb911 r7cfe5c0 37 37 38 38 #include <bool.h> 39 #include <mouse.h>40 #include <mouse_port.h>41 #include <mouse_proto.h>39 #include "../mouse.h" 40 #include "../mouse_port.h" 41 #include "../mouse_proto.h" 42 42 43 43 static mouse_dev_t *mouse_dev; -
uspace/srv/hid/input/proto/mousedev.c
rb9cb911 r7cfe5c0 43 43 #include <errno.h> 44 44 #include <ipc/mouseev.h> 45 #include <input.h>46 45 #include <loc.h> 47 #include <mouse.h>48 #include <mouse_port.h>49 #include <mouse_proto.h>50 46 #include <sys/typefmt.h> 47 #include "../mouse.h" 48 #include "../mouse_port.h" 49 #include "../mouse_proto.h" 50 #include "../input.h" 51 51 52 52 /** Mousedev softstate */ … … 94 94 IPC_GET_ARG1(call), IPC_GET_ARG2(call), 95 95 IPC_GET_ARG3(call)); 96 retval = EOK; 97 break; 98 case MOUSEEV_ABS_MOVE_EVENT: 99 mouse_push_event_abs_move(mousedev->mouse_dev, 100 IPC_GET_ARG1(call), IPC_GET_ARG2(call), 101 IPC_GET_ARG3(call), IPC_GET_ARG4(call)); 96 102 retval = EOK; 97 103 break; -
uspace/srv/hid/input/stroke.c
rb9cb911 r7cfe5c0 40 40 */ 41 41 42 #include <stroke.h>43 #include <kbd.h>44 42 #include <io/console.h> 45 43 #include <io/keycode.h> 44 #include "stroke.h" 45 #include "kbd.h" 46 46 47 47 /** Correspondence between modifers and the modifier keycodes. */ -
uspace/srv/hid/input/stroke.h
rb9cb911 r7cfe5c0 28 28 29 29 /** @addtogroup inputgen generic 30 * @brief Generic scancode parser.31 * @ingroup input30 * @brief Generic scancode parser. 31 * @ingroup input 32 32 * @{ 33 */ 33 */ 34 34 /** @file 35 35 */ … … 38 38 #define KBD_STROKE_H_ 39 39 40 #include <kbd.h>40 #include "kbd.h" 41 41 42 42 extern void stroke_sim(kbd_dev_t *, unsigned, unsigned); … … 46 46 /** 47 47 * @} 48 */ 49 48 */
Note:
See TracChangeset
for help on using the changeset viewer.
