Changeset 9be360ee in mainline for uspace/srv/hid/kbd/port/gxemul.c


Ignore:
Timestamp:
2011-06-11T22:06:47Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4f3f9659
Parents:
56ad818
Message:

Allow keyboard server to handle more than one driver at the same time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/kbd/port/gxemul.c

    r56ad818 r9be360ee  
    11/*
    22 * Copyright (c) 2007 Michal Kebrt
     3 * Copyright (c) 2011 Jiri Svoboda
    34 * All rights reserved.
    45 *
     
    4243#include <errno.h>
    4344
    44 static int gxemul_port_init(void);
     45static int gxemul_port_init(kbd_dev_t *);
    4546static void gxemul_port_yield(void);
    4647static void gxemul_port_reclaim(void);
     
    5354        .write = gxemul_port_write
    5455};
     56
     57static kbd_dev_t *kbd_dev;
    5558
    5659static irq_cmd_t gxemul_cmds[] = {
     
    7376
    7477/** Initializes keyboard handler. */
    75 static int gxemul_port_init(void)
     78static int gxemul_port_init(kbd_dev_t *kdev)
    7679{
     80        kbd_dev = kdev;
     81       
    7782        sysarg_t addr;
    7883        if (sysinfo_get_value("kbd.address.virtual", &addr) != EOK)
     
    113118        int scan_code = IPC_GET_ARG2(*call);
    114119
    115         kbd_push_scancode(scan_code);
     120        kbd_push_scancode(kbd_dev, scan_code);
    116121}
    117122
Note: See TracChangeset for help on using the changeset viewer.