Changeset 9be360ee in mainline for uspace/srv/hid/kbd/ctl/stty.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/ctl/stty.c

    r56ad818 r9be360ee  
    11/*
    2  * Copyright (c) 2009 Jiri Svoboda
     2 * Copyright (c) 2011 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    4343#include <stroke.h>
    4444
    45 static void stty_ctl_parse_scancode(int scancode);
    46 static int stty_ctl_init(kbd_port_ops_t *kbd_port);
    47 static void stty_ctl_set_ind(unsigned mods);
     45static void stty_ctl_parse_scancode(int);
     46static int stty_ctl_init(kbd_dev_t *);
     47static void stty_ctl_set_ind(unsigned);
    4848
    4949kbd_ctl_ops_t stty_ctl = {
     
    5252        .set_ind = stty_ctl_set_ind
    5353};
     54
     55static kbd_dev_t *kbd_dev;
    5456
    5557/** Scancode parser */
     
    217219};
    218220
    219 static int stty_ctl_init(kbd_port_ops_t *kbd_port)
     221static int stty_ctl_init(kbd_dev_t *kdev)
    220222{
    221         (void) kbd_port;
     223        kbd_dev = kdev;
    222224        ds = 0;
    223225
     
    232234        ds = gsp_step(&sp, ds, scancode, &mods, &key);
    233235        if (key != 0) {
    234                 stroke_sim(mods, key);
     236                stroke_sim(kbd_dev, mods, key);
    235237        }
    236238}
Note: See TracChangeset for help on using the changeset viewer.