Changeset b6a088f in mainline


Ignore:
Timestamp:
2012-08-16T19:14:03Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c9d011e4
Parents:
9f5cf68
Message:

use local includes within the input server

Location:
uspace/srv/hid/input
Files:
21 edited
14 moved

Legend:

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

    r9f5cf68 rb6a088f  
    2929
    3030USPACE_PREFIX = ../../..
    31 EXTRA_CFLAGS = -Iinclude
    3231BINARY = input
    3332
    3433SOURCES = \
    35         generic/gsp.c \
    36         generic/input.c \
    37         generic/layout.c \
    38         generic/stroke.c \
    3934        layout/cz.c \
    4035        layout/us_qwerty.c \
     
    5651        ctl/pc.c \
    5752        ctl/stty.c \
    58         ctl/sun.c
     53        ctl/sun.c \
     54        gsp.c \
     55        input.c \
     56        layout.c \
     57        stroke.c
    5958
    6059include $(USPACE_PREFIX)/Makefile.common
  • uspace/srv/hid/input/ctl/apple.c

    r9f5cf68 rb6a088f  
    3636 */
    3737
    38 #include <kbd.h>
    3938#include <io/console.h>
    4039#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"
    4343
    4444static void apple_ctl_parse(sysarg_t);
  • uspace/srv/hid/input/ctl/gxe_fb.c

    r9f5cf68 rb6a088f  
    3333/**
    3434 * @file
    35  * @brief       GXEmul framebuffer-mode keyboard controller driver.
     35 * @brief GXEmul framebuffer-mode keyboard controller driver.
    3636 */
    3737
    38 #include <kbd.h>
    3938#include <io/console.h>
    4039#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"
    4545
    4646static void gxe_fb_ctl_parse(sysarg_t);
  • uspace/srv/hid/input/ctl/kbdev.c

    r9f5cf68 rb6a088f  
    4040#include <errno.h>
    4141#include <fcntl.h>
    42 #include <gsp.h>
    4342#include <io/console.h>
    4443#include <io/keycode.h>
    4544#include <ipc/kbdev.h>
    46 #include <input.h>
    47 #include <kbd.h>
    48 #include <kbd_ctl.h>
    49 #include <kbd_port.h>
    5045#include <loc.h>
    5146#include <stdlib.h>
    5247#include <vfs/vfs_sess.h>
    5348#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"
    5454
    5555static int kbdev_ctl_init(kbd_dev_t *);
  • uspace/srv/hid/input/ctl/pc.c

    r9f5cf68 rb6a088f  
    3636 */
    3737
    38 #include <kbd.h>
    3938#include <io/console.h>
    4039#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"
    4444
    4545static void pc_ctl_parse(sysarg_t);
  • uspace/srv/hid/input/ctl/stty.c

    r9f5cf68 rb6a088f  
    3838 */
    3939
    40 #include <kbd.h>
    4140#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"
    4646
    4747static void stty_ctl_parse(sysarg_t);
  • uspace/srv/hid/input/ctl/sun.c

    r9f5cf68 rb6a088f  
    3737 */
    3838
    39 #include <kbd.h>
    4039#include <io/console.h>
    4140#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"
    4444
    4545static void sun_ctl_parse(sysarg_t);
  • uspace/srv/hid/input/gsp.c

    r9f5cf68 rb6a088f  
    3131 * @ingroup  input
    3232 * @{
    33  */ 
     33 */
    3434/** @file
    35  * @brief       Generic scancode parser.
     35 * @brief Generic scancode parser.
    3636 *
    3737 * The scancode parser is a simple finite state machine. It is described
     
    4949 */
    5050
    51 #include <gsp.h>
    5251#include <adt/hash_table.h>
    5352#include <stdlib.h>
    5453#include <stdio.h>
    55 
    56 #define TRANS_TABLE_CHAINS 256
     54#include "gsp.h"
     55
     56#define TRANS_TABLE_CHAINS  256
    5757
    5858/*
  • uspace/srv/hid/input/input.c

    r9f5cf68 rb6a088f  
    5454#include <io/keycode.h>
    5555#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"
    6363
    6464#define NUM_LAYOUTS  3
     
    646646}
    647647
     648static void usage(char *name)
     649{
     650        printf("Usage: %s <service_name>\n", name);
     651}
     652
    648653int main(int argc, char **argv)
    649654{
     655        if (argc < 2) {
     656                usage(argv[0]);
     657                return 1;
     658        }
     659       
    650660        printf("%s: HelenOS input service\n", NAME);
    651661       
     
    682692       
    683693        service_id_t service_id;
    684         rc = loc_service_register(kbd, &service_id);
    685         if (rc != EOK) {
    686                 printf("%s: Unable to register service %s\n", NAME, kbd);
     694        rc = loc_service_register(argv[1], &service_id);
     695        if (rc != EOK) {
     696                printf("%s: Unable to register service %s\n", NAME, argv[1]);
    687697                return rc;
    688698        }
     
    692702       
    693703        printf("%s: Accepting connections\n", NAME);
     704        task_retval(0);
    694705        async_manager();
    695706       
  • uspace/srv/hid/input/input.h

    r9f5cf68 rb6a088f  
    4242#include <async.h>
    4343
    44 #define NAME       "input"
    45 #define NAMESPACE  "hid"
     44#define NAME  "input"
    4645
    4746extern bool irc_service;
  • uspace/srv/hid/input/kbd_ctl.h

    r9f5cf68 rb6a088f  
    3838#define KBD_CTL_H_
    3939
    40 #include <kbd_port.h>
     40#include "kbd_port.h"
    4141
    4242struct kbd_dev;
  • uspace/srv/hid/input/layout.c

    r9f5cf68 rb6a088f  
    3737
    3838#include <errno.h>
    39 #include <input.h>
    40 #include <layout.h>
    4139#include <stdlib.h>
     40#include "input.h"
     41#include "layout.h"
    4242
    4343/** Create a new layout instance. */
  • uspace/srv/hid/input/layout/cz.c

    r9f5cf68 rb6a088f  
    3333
    3434#include <errno.h>
    35 #include <input.h>
    3635#include <io/console.h>
    3736#include <io/keycode.h>
    3837#include <bool.h>
    39 #include <layout.h>
    4038#include <stdlib.h>
     39#include "../input.h"
     40#include "../layout.h"
    4141
    4242static int cz_create(layout_t *);
  • uspace/srv/hid/input/layout/us_dvorak.c

    r9f5cf68 rb6a088f  
    3333
    3434#include <errno.h>
    35 #include <kbd.h>
    3635#include <io/console.h>
    3736#include <io/keycode.h>
    38 #include <layout.h>
     37#include "../layout.h"
     38#include "../kbd.h"
    3939
    4040static int us_dvorak_create(layout_t *);
  • uspace/srv/hid/input/layout/us_qwerty.c

    r9f5cf68 rb6a088f  
    2828
    2929/** @addtogroup input
    30  * @brief       US QWERTY layout.
     30 * @brief US QWERTY layout.
    3131 * @{
    3232 */
    3333
    3434#include <errno.h>
    35 #include <kbd.h>
    3635#include <io/console.h>
    3736#include <io/keycode.h>
    38 #include <layout.h>
     37#include "../layout.h"
     38#include "../kbd.h"
    3939
    4040static int us_qwerty_create(layout_t *);
  • uspace/srv/hid/input/mouse_proto.h

    r9f5cf68 rb6a088f  
    3838#define MOUSE_PROTO_H_
    3939
    40 #include <mouse_port.h>
     40#include "mouse_port.h"
    4141
    4242struct mouse_dev;
  • uspace/srv/hid/input/port/adb.c

    r9f5cf68 rb6a088f  
    3737#include <ipc/adb.h>
    3838#include <async.h>
    39 #include <input.h>
    40 #include <kbd_port.h>
    41 #include <kbd.h>
    4239#include <vfs/vfs.h>
    4340#include <fcntl.h>
    4441#include <errno.h>
    4542#include <loc.h>
     43#include "../input.h"
     44#include "../kbd_port.h"
     45#include "../kbd.h"
    4646
    4747static void kbd_port_events(ipc_callid_t iid, ipc_call_t *icall, void *arg);
  • uspace/srv/hid/input/port/adb_mouse.c

    r9f5cf68 rb6a088f  
    3737#include <ipc/adb.h>
    3838#include <async.h>
    39 #include <input.h>
    40 #include <mouse_port.h>
    41 #include <mouse.h>
    4239#include <errno.h>
    4340#include <loc.h>
    4441#include <stdio.h>
     42#include "../mouse.h"
     43#include "../mouse_port.h"
     44#include "../input.h"
    4545
    4646static mouse_dev_t *mouse_dev;
  • uspace/srv/hid/input/port/chardev.c

    r9f5cf68 rb6a088f  
    3737#include <ipc/char.h>
    3838#include <async.h>
    39 #include <input.h>
    40 #include <kbd_port.h>
    41 #include <kbd.h>
    4239#include <loc.h>
    4340#include <errno.h>
    4441#include <stdio.h>
     42#include "../input.h"
     43#include "../kbd_port.h"
     44#include "../kbd.h"
    4545
    4646static void kbd_port_events(ipc_callid_t iid, ipc_call_t *icall, void *arg);
  • uspace/srv/hid/input/port/gxemul.c

    r9f5cf68 rb6a088f  
    3131 * @{
    3232 * @ingroup  kbd
    33  */ 
     33 */
    3434/** @file
    35  * @brief       GXEmul keyboard port driver.
     35 * @brief GXEmul keyboard port driver.
    3636 */
    3737
    3838#include <async.h>
    3939#include <sysinfo.h>
    40 #include <kbd_port.h>
    41 #include <kbd.h>
    4240#include <ddi.h>
    4341#include <errno.h>
     42#include "../kbd_port.h"
     43#include "../kbd.h"
    4444
    4545static int gxemul_port_init(kbd_dev_t *);
  • uspace/srv/hid/input/port/msim.c

    r9f5cf68 rb6a088f  
    3838#include <async.h>
    3939#include <sysinfo.h>
    40 #include <kbd_port.h>
    41 #include <kbd.h>
    4240#include <ddi.h>
    4341#include <errno.h>
     42#include "../kbd_port.h"
     43#include "../kbd.h"
    4444
    4545static int msim_port_init(kbd_dev_t *);
  • uspace/srv/hid/input/port/niagara.c

    r9f5cf68 rb6a088f  
    3131 * @ingroup  kbd
    3232 * @{
    33  */ 
     33 */
    3434/** @file
    35  * @brief       Niagara console keyboard port driver.
     35 * @brief Niagara console keyboard port driver.
    3636 */
    3737
     
    3939#include <ddi.h>
    4040#include <async.h>
    41 #include <kbd.h>
    42 #include <kbd_port.h>
    4341#include <sysinfo.h>
    4442#include <stdio.h>
     
    4644#include <bool.h>
    4745#include <errno.h>
     46#include "../kbd_port.h"
     47#include "../kbd.h"
    4848
    4949static int niagara_port_init(kbd_dev_t *);
  • uspace/srv/hid/input/port/ns16550.c

    r9f5cf68 rb6a088f  
    3939#include <async.h>
    4040#include <sysinfo.h>
    41 #include <input.h>
    42 #include <kbd.h>
    43 #include <kbd_port.h>
    4441#include <ddi.h>
    4542#include <errno.h>
     43#include "../input.h"
     44#include "../kbd_port.h"
     45#include "../kbd.h"
    4646
    4747static int ns16550_port_init(kbd_dev_t *);
  • uspace/srv/hid/input/port/pl050.c

    r9f5cf68 rb6a088f  
    4141#include <unistd.h>
    4242#include <sysinfo.h>
    43 #include <kbd_port.h>
    44 #include <kbd.h>
    4543#include <ddi.h>
    4644#include <stdio.h>
    4745#include <errno.h>
     46#include "../kbd_port.h"
     47#include "../kbd.h"
    4848
    4949static int pl050_port_init(kbd_dev_t *);
  • uspace/srv/hid/input/port/ski.c

    r9f5cf68 rb6a088f  
    3131 * @ingroup  kbd
    3232 * @{
    33  */ 
     33 */
    3434/** @file
    35  * @brief       Ski console keyboard port driver.
     35 * @brief Ski console keyboard port driver.
    3636 */
    37 
    3837
    3938#include <stdlib.h>
    4039#include <unistd.h>
    41 #include <kbd.h>
    42 #include <kbd_port.h>
    4340#include <sys/types.h>
    4441#include <thread.h>
    4542#include <bool.h>
     43#include "../kbd_port.h"
     44#include "../kbd.h"
    4645
    4746static int ski_port_init(kbd_dev_t *);
  • uspace/srv/hid/input/proto/adb.c

    r9f5cf68 rb6a088f  
    3737
    3838#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"
    4242
    4343static mouse_dev_t *mouse_dev;
  • uspace/srv/hid/input/proto/mousedev.c

    r9f5cf68 rb6a088f  
    4343#include <errno.h>
    4444#include <ipc/mouseev.h>
    45 #include <input.h>
    4645#include <loc.h>
    47 #include <mouse.h>
    48 #include <mouse_port.h>
    49 #include <mouse_proto.h>
    5046#include <sys/typefmt.h>
     47#include "../mouse.h"
     48#include "../mouse_port.h"
     49#include "../mouse_proto.h"
     50#include "../input.h"
    5151
    5252/** Mousedev softstate */
  • uspace/srv/hid/input/stroke.c

    r9f5cf68 rb6a088f  
    4040 */
    4141
    42 #include <stroke.h>
    43 #include <kbd.h>
    4442#include <io/console.h>
    4543#include <io/keycode.h>
     44#include "stroke.h"
     45#include "kbd.h"
    4646
    4747/** Correspondence between modifers and the modifier keycodes. */
  • uspace/srv/hid/input/stroke.h

    r9f5cf68 rb6a088f  
    2828
    2929/** @addtogroup inputgen generic
    30  * @brief       Generic scancode parser.
    31  * @ingroup  input
     30 * @brief Generic scancode parser.
     31 * @ingroup input
    3232 * @{
    33  */ 
     33 */
    3434/** @file
    3535 */
     
    3838#define KBD_STROKE_H_
    3939
    40 #include <kbd.h>
     40#include "kbd.h"
    4141
    4242extern void stroke_sim(kbd_dev_t *, unsigned, unsigned);
     
    4646/**
    4747 * @}
    48  */
    49 
     48 */
Note: See TracChangeset for help on using the changeset viewer.